#{r setup, include=FALSE} #knitr::opts_chunk$set( # echo = TRUE, # message = FALSE, # warning = FALSE, # paged.print = FALSE, # root.dir = rprojroot::find_rstudio_root_file() #) #

Challenge Objective

Your goal is to perform an 15-min total_drawl forecast. You’ll need to engineer features that help. In this challenge, you’ll:

  1. Add event data to the state total_drawl dataset
  2. Preprocess the data
  3. Create multiple recipes
  4. Implement a modeltime forecasting workflow using multiple linear regression workflow objects

Libraries

# Modeling
library(tidymodels)
## Registered S3 method overwritten by 'tune':
##   method                   from   
##   required_pkgs.model_spec parsnip
## -- Attaching packages -------------------------------------- tidymodels 0.1.3 --
## v broom        0.7.9      v recipes      0.1.16
## v dials        0.0.9      v rsample      0.1.0 
## v dplyr        1.0.7      v tibble       3.1.3 
## v ggplot2      3.3.5      v tidyr        1.1.3 
## v infer        0.5.4      v tune         0.1.6 
## v modeldata    0.1.1      v workflows    0.2.3 
## v parsnip      0.1.7      v workflowsets 0.1.0 
## v purrr        0.3.4      v yardstick    0.0.8
## -- Conflicts ----------------------------------------- tidymodels_conflicts() --
## x purrr::discard() masks scales::discard()
## x dplyr::filter()  masks stats::filter()
## x dplyr::lag()     masks stats::lag()
## x recipes::step()  masks stats::step()
## * Use tidymodels_prefer() to resolve common conflicts.
library(modeltime)

# Core
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v readr   2.0.0     v forcats 0.5.1
## v stringr 1.4.0
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x readr::col_factor() masks scales::col_factor()
## x purrr::discard()    masks scales::discard()
## x dplyr::filter()     masks stats::filter()
## x stringr::fixed()    masks recipes::fixed()
## x dplyr::lag()        masks stats::lag()
## x readr::spec()       masks yardstick::spec()
library(timetk)
library(lubridate)
## 
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library(janitor)
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test

Collect Data

Read in the following data sets.

state total_drawl

state_tbl  <- read_rds("data/state_gen1.rds")

state_tbl
## # A tibble: 2,976 x 33
##    timestamp           CHHATTISGARH_Schedule CHHATTISGARH_Dra~ CHHATTISGARH_Dev~
##    <dttm>                              <dbl>             <dbl>             <dbl>
##  1 2021-05-01 00:00:00                 1662.             1745.             83.1 
##  2 2021-05-01 00:15:00                 1661.             1675.             13.3 
##  3 2021-05-01 00:30:00                 1652.             1644.             -7.23
##  4 2021-05-01 00:45:00                 1642.             1650.              8.63
##  5 2021-05-01 01:00:00                 1594.             1589.             -5.2 
##  6 2021-05-01 01:15:00                 1574.             1631.             56.8 
##  7 2021-05-01 01:30:00                 1652.             1583.            -68.5 
##  8 2021-05-01 01:45:00                 1554.             1556.              1.82
##  9 2021-05-01 02:00:00                 1498.             1573.             75.2 
## 10 2021-05-01 02:15:00                 1468.             1579.            112.  
## # ... with 2,966 more rows, and 29 more variables: GUJARAT_Schedule <dbl>,
## #   GUJARAT_Drawal <dbl>, GUJARAT_Deviation <dbl>,
## #   MADHYAPRADESH_Schedule <dbl>, MADHYAPRADESH_Drawal <dbl>,
## #   MADHYAPRADESH_Deviation <dbl>, MAHARASHTRA_Schedule <dbl>,
## #   MAHARASHTRA_Drawal <dbl>, MAHARASHTRA_Deviation <dbl>, GOA_Schedule <dbl>,
## #   GOA_Drawal <dbl>, GOA_Deviation <dbl>, DD_Schedule <dbl>, DD_Drawal <dbl>,
## #   DD_Deviation <dbl>, DNH_Schedule <dbl>, DNH_Drawal <dbl>, ...

Preparing Data

We will find the total demand from the state so we will only select the total_drawl column

state_tbl_dem <- state_tbl %>% 
  select(timestamp, total_drawl)

state_tbl_dem
## # A tibble: 2,976 x 2
##    timestamp           total_drawl
##    <dttm>                    <dbl>
##  1 2021-05-01 00:00:00      18630.
##  2 2021-05-01 00:15:00      19414.
##  3 2021-05-01 00:30:00      19427.
##  4 2021-05-01 00:45:00      19460.
##  5 2021-05-01 01:00:00      19115.
##  6 2021-05-01 01:15:00      18813 
##  7 2021-05-01 01:30:00      18581.
##  8 2021-05-01 01:45:00      18381.
##  9 2021-05-01 02:00:00      18286.
## 10 2021-05-01 02:15:00      18781.
## # ... with 2,966 more rows

Preparing Data

Our objectives are to:

Aggregate total_drawl by hour

  1. Start with state_tbl
  2. Use summarise_by_time() with .by = "hour", and sum() the total_drawl.
  3. Save as a new variable called state_daily_tbl
state_daily_tbl <- state_tbl_dem %>%
  mutate(sunday = ifelse(weekdays(timestamp) == 'Sunday',1,0),
         saturday = ifelse(weekdays(timestamp) == 'Saturday',1,0))
    


state_daily_tbl 
## # A tibble: 2,976 x 4
##    timestamp           total_drawl sunday saturday
##    <dttm>                    <dbl>  <dbl>    <dbl>
##  1 2021-05-01 00:00:00      18630.      0        1
##  2 2021-05-01 00:15:00      19414.      0        1
##  3 2021-05-01 00:30:00      19427.      0        1
##  4 2021-05-01 00:45:00      19460.      0        1
##  5 2021-05-01 01:00:00      19115.      0        1
##  6 2021-05-01 01:15:00      18813       0        1
##  7 2021-05-01 01:30:00      18581.      0        1
##  8 2021-05-01 01:45:00      18381.      0        1
##  9 2021-05-01 02:00:00      18286.      0        1
## 10 2021-05-01 02:15:00      18781.      0        1
## # ... with 2,966 more rows

Aggregate Events by hour

  1. Start with demand_events_tbl
  2. Use add_column() to create a column called “event_val”. Set the values in the column to 1.
  3. Use group_by() to group on the “event” column.
  4. Use summarise_by_time() with .by = "hour", and sum() the “event_val” column.
  5. Ungroup the data.
  6. Pivot the data wider so we have a “date” column:
    • Use: names_from = event
    • Use: values_from = event_val
    • Use: values_fill = 0
    • Use: names_prefix = "event_"
  7. Clean the names with janitor::clean_names()
  8. Save as a new variable called demand_events_daily_tbl

Visualizations

Visualize total_drawl

Use plot_time_series() to visualize the total_drawl.

  • Look for outliers & any data issues
  • Try out a log() transformation to see the effect on the time series
state_daily_tbl %>% 
    plot_time_series(timestamp, log(total_drawl))

We’ll use these parameters to create our “full dataset”. We’ve selecte an 8-hour forecast horizon. Our lag period is 8 hours and we’ll try out a few rolling averages at various aggregations.

state_daily_tbl %>%
  plot_acf_diagnostics(.date_var = timestamp, .value = total_drawl)
horizon         <- 96
lag_period      <- 96
rolling_periods <- c(4, 8, 16, 24, 36,72)

Prepare the full data

Next, join the aggregated daily state total_drawl data and the demand events data.

  1. Start with state_daily_tbl
  2. Add the future window: Use bind_rows() and future_frame() to extend the data frame .length_out = horizon.
  3. Add autocorrelated lags: Use tk_augment_lags() to add a .lags = lag_period
  4. Add rolling features from our lag: Use tk_agument_slidify() to add .period = rolling_periods. Use mean as the rolling function. Make sure to “center” with “partial” windows.
  5. Add events:
    • Left join demand_events_daily_tbl
    • Fill in the missing values with zero for any column that start with “event_”
  6. Rename any columns that contain “lag”. Modify to start with “lag_”
  7. Save the output as full_tbl.
full_tbl <- state_daily_tbl %>%
    
    # Add future window
    bind_rows(
        future_frame(.data = ., .date_var = timestamp, .length_out = horizon)
    ) %>%
    
    # Add autocorrelated lags
    tk_augment_lags(total_drawl, .lags = c(30,64,96)) %>%
    
    # Add rolling features
    tk_augment_slidify(
        .value   = total_drawl,
        .f       = mean, 
        .period  = rolling_periods,
        .align   = "center",
        .partial = TRUE
    ) %>%
  mutate(across(ends_with("day"), .fns = ~ ifelse(is.na(.), 0, .))) %>%
    
  
    # Rename columns
    rename_with(.cols = contains("lag"), .fn = ~ str_c("lag_", .))

full_tbl %>% glimpse()
## Rows: 3,072
## Columns: 13
## $ timestamp             <dttm> 2021-05-01 00:00:00, 2021-05-01 00:15:00, 2021-~
## $ total_drawl           <dbl> 18630.18, 19413.84, 19426.54, 19459.81, 19114.68~
## $ sunday                <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ saturday              <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ lag_total_drawl_lag30 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ lag_total_drawl_lag64 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ lag_total_drawl_lag96 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ total_drawl_roll_4    <dbl> 19156.85, 19232.59, 19353.72, 19203.51, 18992.20~
## $ total_drawl_roll_8    <dbl> 19209.01, 19143.01, 19062.77, 18977.59, 18934.55~
## $ total_drawl_roll_16   <dbl> 18900.73, 18888.76, 18898.92, 18898.73, 18882.40~
## $ total_drawl_roll_24   <dbl> 18882.40, 18879.60, 18877.21, 18875.97, 18865.88~
## $ total_drawl_roll_36   <dbl> 18848.93, 18854.19, 18874.34, 18923.09, 18991.64~
## $ total_drawl_roll_72   <dbl> 19441.98, 19463.52, 19482.33, 19500.71, 19519.50~

Visualize the Full Data

Visualize the features, and review what you see.

  1. Start with full_tbl
  2. pivot_longer every column except “timestamp”
  3. Use plot_time_series() to visualize the time series coloring by “name”.

Review the visualization selecting one feature at a time and answering the following questions:

- Do the rolling lags present any issues? 
- Which rolling lag captures the trend the best?
- Do you expect either of the weekend Events features to help?
full_tbl %>%
    pivot_longer(-timestamp) %>%
    plot_time_series(timestamp, value, name, .smooth = FALSE)

Create a data_prepared_tbl by filtering full_tbl where “total_drawl” is non-missing.

data_prepared_tbl <- full_tbl %>%
    filter(!is.na(total_drawl))
data_prepared_tbl
## # A tibble: 2,976 x 13
##    timestamp           total_drawl sunday saturday lag_total_drawl_lag30
##    <dttm>                    <dbl>  <dbl>    <dbl>                 <dbl>
##  1 2021-05-01 00:00:00      18630.      0        1                    NA
##  2 2021-05-01 00:15:00      19414.      0        1                    NA
##  3 2021-05-01 00:30:00      19427.      0        1                    NA
##  4 2021-05-01 00:45:00      19460.      0        1                    NA
##  5 2021-05-01 01:00:00      19115.      0        1                    NA
##  6 2021-05-01 01:15:00      18813       0        1                    NA
##  7 2021-05-01 01:30:00      18581.      0        1                    NA
##  8 2021-05-01 01:45:00      18381.      0        1                    NA
##  9 2021-05-01 02:00:00      18286.      0        1                    NA
## 10 2021-05-01 02:15:00      18781.      0        1                    NA
## # ... with 2,966 more rows, and 8 more variables: lag_total_drawl_lag64 <dbl>,
## #   lag_total_drawl_lag96 <dbl>, total_drawl_roll_4 <dbl>,
## #   total_drawl_roll_8 <dbl>, total_drawl_roll_16 <dbl>,
## #   total_drawl_roll_24 <dbl>, total_drawl_roll_36 <dbl>,
## #   total_drawl_roll_72 <dbl>

Create a forecast_tbl by filtering full_tbl where “demand” is missing.

forecast_tbl <- full_tbl %>%
    filter(is.na(total_drawl))
forecast_tbl
## # A tibble: 96 x 13
##    timestamp           total_drawl sunday saturday lag_total_drawl_lag30
##    <dttm>                    <dbl>  <dbl>    <dbl>                 <dbl>
##  1 2021-06-01 00:00:00          NA      0        0                20742.
##  2 2021-06-01 00:15:00          NA      0        0                20186.
##  3 2021-06-01 00:30:00          NA      0        0                19763.
##  4 2021-06-01 00:45:00          NA      0        0                19594.
##  5 2021-06-01 01:00:00          NA      0        0                19234.
##  6 2021-06-01 01:15:00          NA      0        0                18339.
##  7 2021-06-01 01:30:00          NA      0        0                17646.
##  8 2021-06-01 01:45:00          NA      0        0                17637.
##  9 2021-06-01 02:00:00          NA      0        0                17488.
## 10 2021-06-01 02:15:00          NA      0        0                17521.
## # ... with 86 more rows, and 8 more variables: lag_total_drawl_lag64 <dbl>,
## #   lag_total_drawl_lag96 <dbl>, total_drawl_roll_4 <dbl>,
## #   total_drawl_roll_8 <dbl>, total_drawl_roll_16 <dbl>,
## #   total_drawl_roll_24 <dbl>, total_drawl_roll_36 <dbl>,
## #   total_drawl_roll_72 <dbl>

Train / Test Split

#data_prepared_tbl %>% write_rds("data/data_prepared_tbl.rds")
 #forecast_tbl %>% write_rds("data/forecast_tbl.rds")

# Checkpoint data
data_prepared_tbl <- read_rds("data/data_prepared_tbl.rds")
forecast_tbl      <- read_rds("data/forecast_tbl.rds")

Split into Train / Test Sets

  • Start with data_prepared_tbl
  • Use time_series_split() to create a single time series split.
    • Set assess = horizon to get the last 8-weeks of data as testing data.
    • Set cumulative = TRUE to use all of the previous data as training data.
  • Save the object as splits
splits <- data_prepared_tbl %>% 
    time_series_split(assess = horizon, cumulative = TRUE)
## Using date_var: timestamp
splits
## <Analysis/Assess/Total>
## <2880/96/2976>

Feature Engineering

#write_rds(splits, "data/splits.rds")

# Checkpoint data
splits <- read_rds("data/splits.rds")

Create a Preprocessing recipe

Make a preprocessing recipe using recipe(). Note - It may help to prep() and juice() your recipe to see the effect of your transformations.

  • Start with recipe() using “total_drawl ~ .” and data = training(splits)
  • Add the following steps:
    • step_timeseries_signature() using the date feature
    • Remove any newly created features that:
      • Contain “.iso”
      • End with “xts”
      • Contain “day”, “hour”, “minute”, “second” or “am.pm” (because this is a weekly dataset and these features won’t add any predictive value)
    • Normalize all numeric data except for “total_drawl” (the target) with step_normalize().
    • Dummy all categorical features with step_dummy(). Set one_hot = TRUE.
    • Add a fourier series at periods 4 and 20. Set K = 2 for both.
recipe_spec_base <- recipe(total_drawl ~ ., data = training(splits)) %>%
    
    # Time Series Signature
    step_timeseries_signature(timestamp) %>%
    step_rm(matches("(iso)|(year)|(half)|(quarter)|(month)|(.xts)|(qday)|(am.pm)")) %>%
    
    # Standardization
    step_normalize(matches("(index.num)|(yday)")) %>%
    
    # Dummy Encoding (One Hot Encoding)
    step_dummy(all_nominal(), one_hot = TRUE) %>%
    
    # Fourier - 4 Week ACF
    step_fourier(timestamp, period = c(4, 32, 64), K = 2)

recipe_spec_base %>% prep() %>% juice() %>% glimpse()
## Rows: 2,880
## Columns: 47
## $ timestamp             <dttm> 2021-05-01 00:00:00, 2021-05-01 00:15:00, 2021-~
## $ sunday                <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ saturday              <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ lag_total_drawl_lag30 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ lag_total_drawl_lag64 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ lag_total_drawl_lag96 <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ~
## $ total_drawl_roll_4    <dbl> 19156.85, 19232.59, 19353.72, 19203.51, 18992.20~
## $ total_drawl_roll_8    <dbl> 19209.01, 19143.01, 19062.77, 18977.59, 18934.55~
## $ total_drawl_roll_16   <dbl> 18900.73, 18888.76, 18898.92, 18898.73, 18882.40~
## $ total_drawl_roll_24   <dbl> 18882.40, 18879.60, 18877.21, 18875.97, 18865.88~
## $ total_drawl_roll_36   <dbl> 18848.93, 18854.19, 18874.34, 18923.09, 18991.64~
## $ total_drawl_roll_72   <dbl> 19441.98, 19463.52, 19482.33, 19500.71, 19519.50~
## $ total_drawl           <dbl> 18630.18, 19413.84, 19426.54, 19459.81, 19114.68~
## $ timestamp_index.num   <dbl> -1.731149, -1.729946, -1.728744, -1.727541, -1.7~
## $ timestamp_day         <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ timestamp_hour        <int> 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, ~
## $ timestamp_minute      <int> 0, 15, 30, 45, 0, 15, 30, 45, 0, 15, 30, 45, 0, ~
## $ timestamp_second      <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_hour12      <int> 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10~
## $ timestamp_wday        <int> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, ~
## $ timestamp_mday        <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ timestamp_yday        <dbl> -1.674956, -1.674956, -1.674956, -1.674956, -1.6~
## $ timestamp_mweek       <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ timestamp_week        <int> 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, ~
## $ timestamp_week2       <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_week3       <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_week4       <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ~
## $ timestamp_mday7       <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ timestamp_wday.lbl_1  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_2  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_3  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_4  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_5  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_6  <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~
## $ timestamp_wday.lbl_7  <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ~
## $ timestamp_sin4_K1     <dbl> 2.809555e-10, -1.000000e+00, 6.316373e-11, 1.000~
## $ timestamp_cos4_K1     <dbl> -1.000000e+00, -3.417266e-10, 1.000000e+00, -2.3~
## $ timestamp_sin4_K2     <dbl> -5.619111e-10, 6.834531e-10, 1.263275e-10, -4.78~
## $ timestamp_cos4_K2     <dbl> 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1,~
## $ timestamp_sin32_K1    <dbl> 9.238795e-01, 8.314696e-01, 7.071068e-01, 5.5557~
## $ timestamp_cos32_K1    <dbl> -3.826834e-01, -5.555702e-01, -7.071068e-01, -8.~
## $ timestamp_sin32_K2    <dbl> -7.071068e-01, -9.238795e-01, -1.000000e+00, -9.~
## $ timestamp_cos32_K2    <dbl> -7.071068e-01, -3.826834e-01, 1.579093e-11, 3.82~
## $ timestamp_sin64_K1    <dbl> -8.314696e-01, -8.819213e-01, -9.238795e-01, -9.~
## $ timestamp_cos64_K1    <dbl> -5.555702e-01, -4.713967e-01, -3.826834e-01, -2.~
## $ timestamp_sin64_K2    <dbl> 9.238795e-01, 8.314696e-01, 7.071068e-01, 5.5557~
## $ timestamp_cos64_K2    <dbl> -3.826834e-01, -5.555702e-01, -7.071068e-01, -8.~

Modeling

#write_rds(recipe_spec_base, "data/recipe_spec_base.rds")

# Checkpoint data
recipe_spec_base <- read_rds("data/recipe_spec_base.rds")

Visualize the train/test split.

splits %>%
    tk_time_series_cv_plan() %>%
    plot_time_series_cv_plan(timestamp, total_drawl)

Modeling

Now that we have a feel for the training and testing data, let’s dive into modeling. There are 3 Sections:

ARIMA

We’ll start by modeling the total_drawl with ARIMA.

Model 1 - Basic Auto ARIMA

Let’s start with a Basic Auto ARIMA:

  • Start with arima_reg() to begin the specification
  • Pipe into set_engine(). Specify “auto_arima” as the engine.
  • Pipe into fit():
    • Use formula = total_drawl ~ timestamp
    • Set data = training(splits)
  • Store the output as model_fit_1_arima_basic
  • Print the output and check out the parameters & AIC.
# model_fit_1_arima_basic <- arima_reg() %>%
#    set_engine("auto_arima") %>%
#    fit(total_drawl ~ timestamp, data = training(splits))



#write_rds(model_fit_1_arima_basic, "data/model_fit_1_arima_basic.rds")

# Checkpoint data
model_fit_1_arima_basic <- read_rds("data/model_fit_1_arima_basic.rds")


model_fit_1_arima_basic
## parsnip model object
## 
## Fit time:  3m 42.5s 
## 
## Call:
## forecast::auto.arima(y = outcome, max.p = max.p, max.q = max.q, max.P = max.P, 
##     max.Q = max.Q, max.d = max.d, max.D = max.D, x = structure(list(x = structure(c(18630.18, 
##     19413.84, 19426.54, 19459.81, 19114.68, 18813, 18581.31, 18381.33, 18285.86, 
##     18781.02, 19000.5, 18896.72, 18686.42, 18843.18, 18843.71, 18857.42, 18704.38, 
##     18767.91, 18641.87, 18954.08, 19277.41, 19946.77, 20499.77, 21056.07, 20897.11, 
##     21190.8, 20924.82, 20495.24, 20024.03, 19804.71, 19961.11, 19787.25, 19371.37, 
##     19625.5, 19839.44, 19758.76, 19809.16, 20260.54, 20197.41, 20217.21, 20271.12, 
##     20134.95, 20072.87, 19895.45, 19951.84, 19935.35, 19800.44, 19726.35, 19589.14, 
##     19815.66, 19670.6, 19474.16, 19658.92, 20177.11, 20434.8, 20765.43, 20992.74, 
##     21291.26, 21326.11, 21026.15, 20927.02, 21043.5, 20898.71, 20508.45, 19996.91, 
##     20274.58, 20235.29, 20331.02, 20340.24, 19888.86, 18887.01, 18126.21, 17602.79, 
##     17303.62, 17424.43, 17659.13, 17750.03, 17849.92, 18015.21, 17330.85, 16901.02, 
##     16991.04, 16853.98, 16917.47, 16827.37, 17030.69, 17377.28, 17510.42, 17920.41, 
##     18756.1, 19075.72, 19419.34, 19628.63, 19457.91, 19587.23, 19405.64, 19089.07, 
##     19085.95, 18926.14, 18768.63, 18502.45, 18150.08, 18085.68, 18044.42, 17998.97, 
##     18166.02, 18145.24, 18039.86, 17903.03, 17942.95, 17814.23, 17494.08, 17329.08, 
##     17267.96, 17263.92, 17707.87, 18108.23, 18747.38, 18991.27, 19095.52, 19260.19, 
##     19575.33, 19905.32, 19997.56, 20289.26, 20619.73, 20793.44, 20588.98, 20340.94, 
##     20307.83, 20083.46, 19807.48, 19511.13, 19510.72, 19746.2, 19682.35, 19611.43, 
##     19566.57, 19447.49, 19557.6, 19869.43, 20352.44, 20289.78, 19756.42, 19468.66, 
##     19485.51, 19423.66, 19618.38, 19499.95, 19436.88, 19555.23, 19540.65, 19584.54, 
##     19717.32, 19687.83, 19724.02, 20198.26, 20335.78, 20471.07, 20591.88, 20340.48, 
##     20423.76, 20188.24, 19800.17, 19690.68, 19386.21, 18785.88, 18394.91, 17891.17, 
##     17913.29, 17933.87, 18210.53, 18141.86, 18283.66, 18267.8, 17840.17, 17745.49, 
##     17837.81, 17845.65, 17725.95, 17501.98, 17578.68, 17853.41, 17940.6, 18428.95, 
##     19397.14, 19940.53, 20291.19, 20335.88, 20366.37, 20535.15, 20338.7, 20109.53, 
##     20300.55, 20117.82, 20179.27, 19793.93, 19261.93, 18928.22, 18433.93, 18316.72, 
##     18517.68, 18408.52, 18407.69, 18090.38, 18019.1, 18311.26, 18371.38, 18156.74, 
##     17998.37, 17970.99, 18211.16, 18689.45, 19066.02, 19698.7, 20142.68, 20312.23, 
##     20758.96, 20646.02, 20677.4, 20461.3, 20992.29, 21126.28, 20987.85, 20586.68, 
##     20572.69, 20592.85, 20704.2, 20361.23, 20490.23, 20423.11, 20507.98, 20934.44, 
##     20936.96, 20746.02, 20853.96, 20890.07, 21134.99, 21044.94, 20947.61, 20523.65, 
##     20721.78, 20513.64, 19956.94, 19885.48, 20096.73, 20036.83, 20289.97, 20240.84, 
##     20466.32, 20498.95, 20390.35, 20492.63, 20557.56, 20349.44, 20045.69, 19762.4, 
##     19683.9, 19640.33, 19520.49, 19240.29, 19323.99, 18910.44, 18608.13, 17697.94, 
##     17424.44, 17113.64, 16993.23, 17009.99, 17370.17, 17601.58, 17184.55, 16663.2, 
##     16853.18, 17155.55, 17091.81, 16834.61, 16994.49, 17315.83, 17621.01, 18052.28, 
##     18760.35, 18969.62, 19065.28, 19233.48, 19410.91, 19287.53, 19015.38, 18689.59, 
##     18604.76, 18967.54, 19151.2, 19096.54, 18914.98, 18342.5, 18245.27, 18086.36, 
##     17990.72, 18048.56, 17894.52, 17897.01, 17836.71, 18039.06, 17930.37, 17918.51, 
##     18117.04, 17983.83, 18008.32, 17933.19, 18204.26, 18860.11, 19545.99, 19495.14, 
##     19594.3, 19210.8, 19159.85, 19116.15, 19591.85, 19567.97, 19394.06, 19121.62, 
##     19177.13, 19048.26, 18618.13, 18625.01, 18942.12, 18679.16, 18727.06, 19005.48, 
##     19463.03, 19590.07, 19632.56, 19944.68, 20366.4, 20348.23, 20267.14, 19558.4, 
##     19653.89, 19521.61, 19380.4, 19248.26, 19676.34, 20117.65, 20464.73, 20664.82, 
##     21190.91, 21561.84, 21559.87, 21679.57, 21510.02, 21380.83, 21004.99, 21208.2, 
##     21602.34, 21435.45, 21270.19, 20906.93, 20820.44, 20434.32, 19806.86, 19099.66, 
##     19082.37, 18989.71, 18945.21, 18535.23, 18782.33, 18630.07, 18188.94, 17541.53, 
##     17457.61, 17529.59, 17895.88, 17669.69, 17671.25, 17847.67, 17954.02, 18294.62, 
##     18683.68, 18874.09, 19118.09, 19200.65, 19544.81, 19540.5, 19463.49, 19634.46, 
##     19891.96, 20111.41, 20407.46, 20345.55, 20137.95, 19960.06, 19588.85, 19261.22, 
##     19347.86, 19235.48, 19180.98, 18914.8, 18965.39, 18996.52, 18767.93, 18366.02, 
##     18316.36, 18439.48, 18751.1, 19126.76, 19978.83, 20579.89, 20761.51, 20662.34, 
##     20831.1, 20809.8, 20881.06, 21262.65, 21165.37, 20803.9, 20288.77, 19682.27, 
##     19649.9, 19799.58, 19613.27, 19695.65, 19993.3, 20107.16, 20040.55, 20322.09, 
##     20278.71, 20040.93, 20280.17, 20550.89, 20701.71, 20655.85, 20171.8, 19938.12, 
##     20358.01, 20235.65, 20100.55, 19885.45, 19934.13, 20245.77, 20403.95, 20430.03, 
##     20994.41, 21335.82, 21251.42, 21428.96, 21382.72, 21452.34, 21472.21, 21314.41, 
##     21333.48, 21250.01, 21107.57, 20884.01, 20475.34, 20084.77, 19455.52, 18804.79, 
##     18610.75, 18484.35, 18639.54, 18737.2, 18541.06, 17985.02, 17734.94, 17324.48, 
##     17273.48, 17463.84, 17739.96, 18004.02, 17803.81, 18260.02, 18228.66, 18574.1, 
##     19341.29, 19811.31, 20024.17, 20096.93, 20293.76, 20294.97, 20245.98, 20225.51, 
##     20430.69, 20653.41, 20513.57, 20212.71, 20056.14, 19767.46, 19632.27, 19256.4, 
##     19166.25, 19019.54, 18893.08, 18865.51, 18977.26, 19207.24, 19032.95, 18909.97, 
##     18915.58, 18877.86, 18920.22, 19016.18, 19814.69, 20812.94, 21395.14, 21626.65, 
##     22068.93, 22237.74, 22087.07, 22196.72, 22315.8, 21820.37, 21434.93, 20780.78, 
##     20814.79, 20795.83, 20796.33, 20635.01, 20498.8, 20480.65, 20275.43, 20277.09, 
##     20162.72, 20305.12, 20546.88, 20763.71, 21120.08, 21284.3, 21345.85, 20952.54, 
##     21218.29, 21200.6, 21109.88, 20733.88, 20621.86, 21029.17, 21273.15, 20993.9, 
##     21207.77, 21345, 21752.83, 22247.54, 22342.62, 22037.99, 21630.73, 21204.21, 
##     21462.13, 21125.82, 20834.85, 20378.12, 19848.75, 19442.75, 19140.5, 18635.84, 
##     18342.7, 18252.7, 18259.47, 18582.49, 19016.84, 19173, 18816.79, 17594.79, 
##     17129.87, 17045.35, 17497.64, 17772.63, 17536.93, 17712.77, 18114.67, 18816.32, 
##     19461.63, 20045.89, 20005.81, 20272.23, 20350.28, 20262.97, 20331.99, 20419.92, 
##     20341.29, 20281.36, 20396.78, 20441.3, 20428.6, 20141.29, 19803.1, 19649.49, 
##     19435.69, 19266.19, 19299.79, 19177.02, 19290.19, 19522.13, 19344.4, 19043.73, 
##     19145.07, 19255.74, 19437.7, 19680.98, 20294.35, 21060.76, 21777, 21613.16, 
##     21884.45, 22066.45, 22169.23, 22323.45, 22467.31, 22281.33, 21929.66, 21305.68, 
##     21103.63, 21033.99, 21123.05, 21162.89, 21403.24, 21426.92, 21266.2, 21284.99, 
##     21413.89, 21338.99, 21133.42, 21160.21, 21396.39, 21235.43, 21045.26, 20660.22, 
##     20677.37, 21053.88, 21056.12, 21120.18, 21108.66, 21440.25, 21882.2, 22060.49, 
##     22304.65, 22427.1, 22263.81, 22038.63, 21876.76, 21690.65, 21613.77, 21693.36, 
##     21582.78, 21324.48, 20776.32, 20629.68, 20459.98, 20155.65, 19602.47, 19120.08, 
##     19323.42, 19299.14, 19167.36, 18509.92, 18351.01, 18295.51, 17908.21, 17711.97, 
##     18028, 17734.15, 17406.95, 17310.11, 17500.85, 17586.91, 17995.36, 18322.07, 
##     19318.48, 19828.01, 19761.72, 19375.35, 19266.93, 19130.03, 19125.35, 19208.75, 
##     19370.79, 19286.56, 19304.03, 18990.36, 19014.41, 19054.6, 18811.5, 18388.43, 
##     18547.89, 18193.3, 18448.38, 18410.84, 18395.29, 18354.53, 18174.42, 18117.74, 
##     18107.74, 18162.31, 18466.35, 19002.85, 19744.83, 20533.39, 20872.45, 20530.31, 
##     20818.92, 21127.23, 20788.8, 20726.55, 21257.48, 21225.27, 21091.87, 20707.83, 
##     20902.64, 20850.57, 20792.02, 20532.79, 20581.34, 20612.43, 20517.63, 20640.57, 
##     20822.89, 20797.54, 20646.56, 20998.91, 21013, 21004.2, 20903.21, 20523.36, 
##     21017.97, 21152.79, 21074.04, 20948.19, 21264.15, 21750.16, 21698.25, 21804.47, 
##     22058.22, 22281.55, 22684.43, 22950.62, 22911.54, 22693.68, 22474.03, 22325.58, 
##     21863.09, 21265.51, 20512.7, 20430.1, 20614.61, 20490.3, 19900.14, 19178.91, 
##     18785.39, 18503.18, 17758.75, 17585.82, 17749.7, 17459.01, 17420.75, 17228.89, 
##     17258.61, 17351.19, 17287.57, 17136.78, 17183.31, 17072.03, 16957.77, 17399.89, 
##     17806.73, 18137.5, 18381.05, 18517.4, 18764.39, 19041.86, 19072.2, 19308.04, 
##     19505.48, 19782.33, 19913.18, 19839.52, 19596.05, 19196.69, 18878.25, 18303.21, 
##     18373.05, 18033.39, 17973.32, 17945.03, 18128.2, 18161.8, 18058.86, 18087.03, 
##     18050.17, 18279.59, 18557.34, 18789.62, 19445.64, 20080.44, 20199.33, 20513.59, 
##     20906.9, 20880.92, 20791.92, 21030.89, 20879.83, 20877.02, 20532.57, 20075.14, 
##     19950.6, 19848.27, 19317.14, 19208.8, 19395.56, 19479.62, 19364.27, 19418.61, 
##     19580.72, 19341.99, 19335.19, 19498.19, 19625.96, 19569.96, 19394.94, 19027.42, 
##     19213.92, 19313.19, 19171.87, 19150.43, 19527.5, 19614.42, 19266.1, 18776.68, 
##     19105.28, 19517.74, 19693.56, 19882.25, 19604.68, 19251.02, 19515.26, 19018.56, 
##     18618.65, 18324.94, 17765.29, 17363.41, 17149.94, 16634.81, 16407.28, 16039.38, 
##     16066.24, 16267.08, 16044.27, 15551.65, 15736, 15603, 15105.91, 14802.35, 
##     14937.88, 15243.14, 15562.86, 15652.61, 16341.93, 17001.05, 17130.2, 17720.89, 
##     18382.82, 18890.81, 18976.11, 19186.95, 19397.61, 19544.16, 19330.16, 18958.97, 
##     18948.88, 18627.14, 18394.43, 18281.51, 17857.44, 17356.84, 17118.56, 16691.2, 
##     16903.74, 16827.93, 16891.11, 17088.99, 17117.65, 17243.66, 17381.92, 17433.35, 
##     17425.11, 17580.74, 17649.98, 18106.17, 18797.46, 19287.16, 19852.61, 20147.62, 
##     20616.3, 20801.14, 20821.32, 20738.34, 20915.33, 20784.44, 20513.2, 19820.19, 
##     19619.18, 19773.57, 19702.06, 19886.23, 20057.08, 20109.22, 19932.03, 20142.15, 
##     20264.16, 20197.58, 20180.9, 20159.69, 20136.73, 20237.59, 20340.95, 20008.92, 
##     19916.12, 19542.68, 19630.16, 19598.46, 19834.13, 20050.25, 20513, 20799.68, 
##     21041.81, 21105.98, 21236.67, 21664.95, 21633.21, 21388.58, 21055.39, 21145.91, 
##     20933.46, 20818.9, 20545.79, 20169.54, 19806.16, 19669.24, 18883.46, 18075.6, 
##     17759.96, 17446.09, 17527.16, 17620.79, 17872.58, 17964.88, 17598.45, 17087.38, 
##     17249.57, 17271.81, 17034.15, 16738.57, 16820.74, 16898.98, 17117.44, 17362.29, 
##     17886.25, 18450.2, 18675.57, 18747.91, 19043.29, 18986.57, 18954.3, 19019.42, 
##     19230.03, 19364.98, 19194.3, 18925.75, 18463.06, 17914.67, 17812.96, 17652.76, 
##     17666.85, 17673.79, 17760.28, 17763.29, 17821.41, 17804.82, 17567.18, 17479.95, 
##     17003.29, 16905.85, 17196.14, 17653.05, 18496.76, 19050.72, 19143.54, 19217.55, 
##     19187.17, 18926.94, 18753.65, 18727.34, 18906.9, 18666.96, 18295.71, 18085.76, 
##     17709.98, 17806.29, 17922.68, 17928.18, 18035.08, 17927.68, 18083.37, 18319.35, 
##     18558.25, 18537.78, 18439.23, 18684.57, 18816.35, 18878.1, 18666.98, 18361.42, 
##     18542.74, 18624.95, 18781.42, 18807.87, 18890.71, 19163.6, 19419.33, 19600.79, 
##     19737.07, 19681.26, 19770.07, 19800.04, 19979.96, 19993.63, 20327.72, 20182.21, 
##     20007, 19567.01, 19178.55, 18784.29, 18295.01, 18001.49, 17476.35, 16914.59, 
##     16863.46, 16844.49, 16977.09, 16973.01, 17712.28, 17749.02, 17567.01, 17266.99, 
##     17263.29, 17321.13, 17445.61, 17165.5, 17006.13, 17306.75, 17443.99, 17874.12, 
##     18477.84, 18666.08, 19310.51, 19244.58, 19370.26, 19403.61, 19463.24, 19332.01, 
##     19163.15, 18972.86, 18961.17, 18811.22, 18813.76, 18539.17, 18277.2, 18183.77, 
##     17896.46, 17922.81, 17997.34, 17829.31, 17502.18, 17602.35, 17832.07, 17795.01, 
##     17654.65, 17641.02, 17993.61, 18296.86, 19150.36, 19914.15, 20073.45, 20063.87, 
##     20616.01, 20575.55, 20302.84, 20354.71, 20023.36, 19690.01, 19307.52, 18883.51, 
##     18888.03, 18791.14, 18752.92, 18644.34, 18747.02, 18809.71, 18883.63, 18920.17, 
##     18845.69, 18733.66, 18675.8, 18898.81, 19098.73, 18845.59, 18410.69, 18100.99, 
##     18368.83, 18399.69, 18177.77, 17997.51, 18362.46, 18195.05, 18305.85, 18548.78, 
##     18809.67, 18972.51, 19043.18, 19392.12, 19340.58, 19438.06, 19482.18, 19038.22, 
##     19217.61, 19259.14, 19337.27, 19087.84, 18842.02, 18566.95, 18181.34, 17551.75, 
##     17263.05, 16987.02, 16533.42, 16309.62, 16273.74, 16055.68, 15817.1, 15365.3, 
##     15282.72, 15363.84, 15523.49, 15790.71, 16015.42, 16155.1, 16107.71, 16387.44, 
##     17085.74, 18057.96, 18110.47, 17967.82, 18008.27, 18175.52, 18240.45, 18130.14, 
##     18056.43, 17854.74, 17919.87, 17659.63, 17593.16, 17709.22, 17378.19, 17316.82, 
##     17734.79, 17680.44, 17828.37, 17877.92, 18098.46, 17997.57, 18115.75, 18144.01, 
##     18271.61, 18289.96, 18367.97, 18685.36, 19206.57, 19874.22, 20127.44, 19911.69, 
##     19991.6, 20091.38, 20044.37, 20185.75, 20203.01, 20200.19, 19932.23, 19248.65, 
##     19109.52, 19382.41, 19589.46, 19519.78, 19407.96, 19586.05, 19770.81, 19846.56, 
##     20135.43, 19986.55, 20066.33, 20055.2, 19791.13, 19337.98, 19192.69, 18961.38, 
##     19079.64, 18869.13, 18787.27, 18502.43, 18819.03, 19078.87, 18902.73, 19278.33, 
##     20024.49, 20537.32, 20713.02, 20457.22, 20680.02, 20423.13, 20730.24, 20797.65, 
##     20623.91, 20672.75, 20635.41, 20158.43, 19740.51, 19111.09, 18367.17, 17588.84, 
##     17540.3, 17876.53, 17744.7, 17512.82, 17639.1, 17717.38, 17456.33, 16796.49, 
##     16898.61, 17097.05, 17156.48, 17431.95, 17782.27, 17965.98, 18297.3, 19016.84, 
##     19579.91, 19897.78, 20413.77, 20552.26, 20765.31, 20799.25, 20635.05, 20537.78, 
##     20342.45, 20052.3, 20116.93, 20053.63, 20206.91, 20659.7, 20751.32, 20001.85, 
##     19751.34, 19473.15, 19408.7, 19415.63, 19112.03, 19263.57, 19583.46, 19638.61, 
##     19833.6, 19813.78, 20329.83, 21037.08, 22006.71, 22743.02, 23120.69, 23218.13, 
##     23563.94, 23850.38, 23564.33, 23333.43, 23258.14, 23188.52, 22752.37, 22234, 
##     22200.07, 21606.76, 21524.39, 22544.11, 22778.58, 23036.45, 22994.39, 23225.2, 
##     23407.97, 23111.8, 22574.37, 22200.1, 22265, 21872.38, 21353.68, 20901.71, 
##     21214.73, 20983.53, 20765.46, 20399.07, 20599.21, 20598.17, 20919.27, 21215.52, 
##     21404.68, 21621.41, 21864.5, 22022.52, 22170.16, 22203.17, 22320.02, 22008.86, 
##     22023.1, 21624.28, 21298.19, 21233, 21063.1, 20703.16, 20179.69, 19260.51, 
##     18694.31, 18402.34, 18235.31, 18120.38, 18408, 18256.73, 18270.24, 17914.87, 
##     17983.75, 17790.06, 17832.22, 18203.01, 18437.91, 18615.56, 18866.54, 19253.58, 
##     19957.7, 20249.09, 20454.54, 20515.55, 21009.49, 21160.59, 20995.35, 20880.6, 
##     21083.25, 21118.04, 21165.88, 20967.06, 20643.26, 20500.54, 20289.48, 19993.39, 
##     19910.46, 19672.47, 19630.13, 19741.18, 19681.6, 19492.28, 19405.23, 19811.94, 
##     19722.29, 19600.44, 19992.36, 20387.63, 21459.46, 21914.19, 22369.02, 22487.49, 
##     22823.51, 22920.89, 22644.14, 22288.52, 22224.27, 21917.24, 21514.09, 20988.66, 
##     21122.93, 21141.07, 20959.85, 20987.55, 21148.64, 21328.04, 21226.66, 21297.04, 
##     21490.31, 21616.48, 21859.77, 22104.05, 22461.02, 22546.69, 22050.95, 21526.6, 
##     21701.56, 21547.57, 21360.91, 21233.99, 21183.48, 21166.6, 21366.33, 21842.21, 
##     22057.98, 22499.99, 23145.54, 23493.79, 23571.06, 23678.93, 23459.22, 23430.69, 
##     23374.62, 23134.81, 22642, 22285.55, 21789.74, 21229.43, 20878.85, 20220.03, 
##     20293.97, 20178.37, 19882.4, 19762.67, 19677.69, 19544.52, 19064.67, 18250.31, 
##     18307.4, 18392.82, 18233.73, 18376.06, 18729.36, 19036.83, 19339.01, 19814.39, 
##     20290.66, 20465.2, 20403.9, 20802.1, 20744.79, 20698.11, 20590.67, 20324.31, 
##     20767.19, 20929.22, 20736.49, 20615.65, 20401.28, 19870.34, 19479.26, 18707.66, 
##     18502.52, 18270.13, 18287.08, 18112.23, 17980.91, 17872.28, 17731.12, 17561.68, 
##     17496.12, 17677.09, 18070.12, 18749.45, 19161.59, 19219.57, 19474.42, 19424.65, 
##     19574.18, 19286.96, 18968.33, 19002.38, 19032.34, 19059.37, 19111.29, 18796.55, 
##     18829.35, 18344.45, 18016.76, 17936.5, 17853.9, 18175.65, 18589.65, 18650.37, 
##     18684.45, 18688, 18427.17, 18597.56, 18574.65, 18362.37, 18250.84, 17901.32, 
##     17722.78, 17529.95, 17628.84, 17654.74, 17640.96, 17747.36, 17819.81, 17698.79, 
##     17323.82, 17221.57, 17720.49, 17750.43, 17470.13, 17253.81, 17086.22, 17314.21, 
##     16730.86, 15946.06, 15339.73, 14824.91, 14722.66, 14311.28, 14185.39, 14056.04, 
##     14227.64, 13957.79, 13756.96, 13707.89, 13744.82, 13801.14, 13369.54, 13617.03, 
##     13592.06, 13352.54, 13677.48, 13637.83, 13820.22, 13605.06, 13540.25, 13900.22, 
##     14579.97, 14867.78, 15052.04, 15330.75, 15559.16, 15491.72, 15431.59, 15211.1, 
##     15107.64, 15115.29, 14997.65, 14806.37, 14683.38, 14773.58, 14609.81, 14364.36, 
##     14375.7, 14411.71, 14248.86, 14146.39, 13967.17, 13824.95, 14265.51, 14125.92, 
##     14013.75, 13824.1, 13870.62, 13900.4, 14190.36, 14588.3, 14709.27, 14762.76, 
##     14943.17, 14939.74, 14939.37, 14896.18, 14632.29, 14441.63, 14493.98, 14045.45, 
##     14290.97, 14179.12, 13833.47, 13820.27, 13541.26, 13177.71, 13153.86, 13448.59, 
##     13456.01, 13499.59, 13671.62, 13297.99, 13289.16, 13298.42, 13082.67, 12841.25, 
##     12737.3, 12579.18, 12499.5, 12228.38, 12584.6, 12585.01, 12826.35, 13270.41, 
##     13609.71, 13870.63, 13987.58, 13974.83, 13610.81, 12942.9, 12807.32, 12994.82, 
##     13043.42, 12935.38, 12656.04, 12699.06, 12814.45, 12611.6, 12379.99, 11944.14, 
##     11893.42, 11941.85, 12474.2, 12477.41, 13064.92, 12944.95, 12381.72, 12116.44, 
##     12076.94, 12025.01, 12045.14, 12170.61, 12188.64, 12551, 12506.17, 12767.66, 
##     13133.46, 13095.83, 13196.68, 13220.06, 13293.04, 13529.41, 13367.19, 13080.15, 
##     13283.11, 13011.9, 13010.93, 13266.66, 13270.75, 12950.41, 12795.41, 12620, 
##     12689.02, 12544.58, 12358.02, 12127.7, 12187.37, 12225.27, 12210.94, 12053.35, 
##     12087.73, 12437.37, 12589.93, 12682.8, 13006.65, 13400.51, 13676.59, 13735.66, 
##     13718.91, 13591.7, 13342.74, 13462.97, 13708.61, 13621.41, 13700.07, 13700.27, 
##     13745.89, 13630.08, 13780.62, 13936.12, 14087.8, 13769.93, 13427.26, 13208.37, 
##     13075.96, 13175.21, 13147.29, 13026.48, 12962.82, 12570.63, 12154.06, 11704.82, 
##     11695.93, 11754.36, 11526.4, 11683.72, 12037.77, 12407.73, 12584.65, 12369.33, 
##     12142.4, 12206.18, 12421.23, 12260.82, 12375.77, 12439.38, 12448.46, 12307.76, 
##     12128.61, 12213.02, 12339.53, 12151.6, 12037.83, 12041.64, 11951.36, 11633.04, 
##     11673.6, 11840.46, 11731.43, 11918.39, 12202.55, 12014.09, 11798.28, 11841.64, 
##     11886.77, 11838.26, 12048.62, 12105.2, 12393.83, 12800.83, 12792.07, 12659.74, 
##     13210.27, 13410.58, 13251.07, 13264.94, 13184.83, 13405.12, 13179.39, 13105.8, 
##     12939.77, 13030.96, 13083.19, 12859.83, 12794.06, 12785.62, 12579.34, 12420.69, 
##     12347.31, 12286.45, 12210.18, 12134.48, 11894.45, 11877.87, 11737.96, 11968.3, 
##     11859.73, 12072.07, 12268.64, 12460.24, 12924.85, 13398.04, 13848.04, 13876.49, 
##     14137.35, 13944.04, 13800.57, 13911.44, 14227.73, 14364.34, 14288.35, 13837.42, 
##     13929.16, 13729.32, 13634.34, 13593.98, 13701.75, 13561.31, 13681.57, 13760.61, 
##     13801.05, 13594.76, 13559.76, 13551.56, 13629.3, 13660.28, 13550.02, 13553.12, 
##     13807.47, 13920.48, 13591.92, 13478.51, 13517.68, 13336.71, 13509.78, 13486.38, 
##     13375.74, 13522.23, 13810.01, 13810.94, 13368.52, 13274.03, 13672.04, 13811.24, 
##     14290.35, 14758.53, 14932.49, 14821.98, 14755.68, 15047.95, 15314.82, 15481.83, 
##     15370.51, 15117.11, 15143.79, 15358.93, 16218.67, 16524.81, 16302.59, 16240.01, 
##     16057.47, 16215.58, 15684.04, 15362.09, 15684.7, 16037.06, 16083.4, 16264.23, 
##     16737.16, 16868.49, 17158.9, 17248.46, 17307.52, 17171.64, 16858.6, 16798.99, 
##     16709.52, 16672.01, 16794.09, 16698.01, 16389.78, 16292.36, 16086.02, 16125.61, 
##     16143.33, 16132.47, 16131.34, 16051, 15915.95, 15819.17, 15626.2, 15590.65, 
##     15888.99, 15931.82, 16192.02, 16337.93, 16560.28, 17100.17, 17503.99, 17523.13, 
##     17654.56, 17674.76, 17630.04, 17522.87, 17709.34, 17893.69, 17578.91, 17166.27, 
##     17473.69, 17222.36, 17071.34, 17083.82, 16975.88, 16927.01, 16876.2, 16836.43, 
##     16924.96, 16780.87, 16796.18, 16812.8, 16580, 16250.13, 16126.39, 15665.48, 
##     15487.94, 15244.41, 15138.84, 15026.17, 15200.17, 15366.02, 15626.36, 15920.51, 
##     16046.36, 15893.9, 15602.22, 15243.6, 15436.93, 15725, 15988.32, 16028.8, 
##     16400.58, 16795.54, 16656.68, 16575.75, 16568.1, 16465.75, 16495.77, 16213.31, 
##     16194, 16330.26, 16448.99, 16470.75, 16744.7, 16690.73, 16674.59, 16185.65, 
##     16519.62, 16582.25, 16270.86, 16330.01, 16703.77, 17208.72, 17382.25, 17604.16, 
##     18073.69, 18354, 18268.4, 18379.46, 18476.81, 18302.84, 18072.45, 17961.8, 
##     17969.11, 17949.82, 18041.99, 18171.52, 18115.33, 18048.32, 17997.43, 17884.06, 
##     17682.16, 17611.71, 17904.44, 17729.99, 17528.3, 17414.43, 17273.74, 17230.89, 
##     17008.69, 17018.58, 17329.97, 17654.21, 18409.04, 18656.47, 19083.25, 19364.23, 
##     19697.68, 19496.72, 18987.73, 19039.47, 19102.83, 18852.04, 18428.39, 17966.28, 
##     17982.32, 18092.84, 17867.57, 17818.16, 17707.33, 17554.53, 17400.71, 17290.7, 
##     17388.93, 17295.87, 17356.03, 17319.39, 17208.8, 17058.18, 16751.02, 16400.09, 
##     16608.55, 16577.36, 16563.84, 16664.46, 16811.07, 17097.64, 17392.69, 17429.06, 
##     18089.14, 18175.47, 18364.04, 18789.63, 18765.58, 18687.04, 18712.02, 18732.64, 
##     18729.75, 18454.81, 18234.68, 18014.24, 17812.4, 17646.61, 17080.83, 16816.78, 
##     16900.06, 16776.34, 16668.19, 16668.06, 16918.4, 17089.61, 16782.58, 16664.59, 
##     16742.95, 16897.26, 17282.74, 17496.15, 17729.9, 18230.92, 18446.35, 19079.35, 
##     19904.79, 20226.41, 20310.05, 20328.36, 20158.81, 20124.35, 19788.43, 19579.14, 
##     19333.87, 18894.66, 18666.55, 18552.66, 18616.58, 18352.52, 18230.94, 18233.09, 
##     17958.13, 17797.92, 17606.37, 17275.43, 17154.58, 17121.85, 17098.05, 17020.47, 
##     17030.54, 17288.31, 17568.81, 17909.05, 18178.97, 18916.62, 19486.62, 19498.28, 
##     19930.2, 20139.4, 20278.96, 20081.34, 20470.47, 20137.33, 19666.6, 18966.84, 
##     18835.83, 18777.27, 18569.62, 18601.45, 18911.4, 19034.75, 19267.8, 19262.32, 
##     19383.85, 19181.6, 19438.62, 19279.24, 18998.75, 18935.77, 18705.78, 18297.5, 
##     18675.37, 18913.24, 18976.5, 18969.84, 19279.81, 19419.6, 19448.91, 20161.27, 
##     20626, 20428.31, 20627.93, 20572.48, 20872.43, 21039.58, 20833.91, 20475.44, 
##     20558.47, 20391.82, 20116.36, 19764.78, 19446.7, 19258.93, 18666.56, 18523.74, 
##     18217.36, 17922.19, 17598.1, 17361.53, 17661.38, 17894.33, 17360.44, 17524.17, 
##     17747.09, 17750.42, 17764.87, 17780.27, 17807.52, 18001.85, 18113.79, 18318.77, 
##     18921.44, 19614.43, 19521.68, 19463.55, 19562.41, 19370.2, 19352.58, 19231.12, 
##     18723.07, 18850.72, 18513.06, 18419.62, 18389.81, 18088.28, 18103.83, 17811.26, 
##     17845.89, 17809.72, 17564.78, 17314.17, 17212.03, 17253.97, 17318.35, 17468.03, 
##     17497.12, 17447.45, 17666.55, 18260.74, 19004.77, 19637.03, 20194.89, 20454.46, 
##     20762.48, 20725.54, 20555.47, 20508.19, 20359.44, 20009.57, 19966.41, 20176.37, 
##     20164.35, 19821.72, 19678.38, 19734.53, 19589.58, 19783.81, 19666.71, 19872.05, 
##     19851.5, 19656.65, 19877.55, 19949.92, 20105.52, 20174.22, 20045.68, 19937.6, 
##     19819.2, 19761.81, 19497.85, 19484.8, 19628.33, 19893.4, 20125.15, 20311.51, 
##     20578.78, 20831.6, 21127.55, 21332.63, 21310, 21312.48, 21324.83, 21007.82, 
##     20789.23, 20757.35, 20387.78, 20357.15, 20148.91, 19774.01, 19566.34, 19026.83, 
##     18737.47, 18538.15, 18295.51, 18596.57, 19363.75, 19547.24, 19408.55, 18994.41, 
##     18781.34, 18930.02, 19043.16, 19187.53, 19298, 19554.11, 19798.43, 20138.96, 
##     20763.65, 20940.18, 21073.83, 21028.33, 21132.61, 21114.34, 20624.53, 20120.62, 
##     20270.23, 20053.86, 20056.94, 19841.38, 19851.18, 19687, 19656.69, 19280.6, 
##     19082.25, 18979.57, 18659.33, 18474.96, 18371.59, 18382.99, 18403.87, 18397.41, 
##     18123.28, 18247.73, 18645.36, 19342.71, 19998.34, 20754.58, 21147.82, 21389.29, 
##     21405.18, 21423.69, 21620.88, 21931.36, 22024.51, 21876.16, 21562.62, 21049.54, 
##     20962.2, 20718.93, 20808.75, 20999.17, 21093.91, 20761.59, 20405.87, 20483.19, 
##     20523.87, 20563.39, 20783.21, 20779.78, 21009.84, 21078.86, 21103.02, 20787.27, 
##     20634.23, 20486.22, 20303.64, 20091.34, 20260.5, 20680.43, 21126.42, 21284.19, 
##     21762.84, 21790.86, 22087.47, 22306.71, 22153.05, 22344.88, 22627.46, 22244.11, 
##     22265.4, 22324.19, 22179.77, 22105.64, 21623.26, 21259.31, 20853.51, 20284.94, 
##     20330.65, 20279.34, 19737.32, 19125.11, 18658.77, 18414.23, 18308.92, 18073.48, 
##     18116.47, 18346.22, 18397.54, 18596.03, 18880.58, 19182.36, 19236.84, 19511.2, 
##     20043.85, 20561.09, 20708.86, 20525.42, 20486.22, 20395.07, 20159.59, 20005.33, 
##     19859.91, 19673.67, 19768.41, 19370.51, 19072.01, 19045.46, 18940.93, 18925.49, 
##     18982.16, 19038.81, 19006.63, 18833.01, 18690.19, 18615.7, 18761.24, 18394.55, 
##     18399.24, 18450.19, 18405.73, 18809.31, 19579.17, 20286.68, 20915.73, 21058.67, 
##     21451.59, 21586.06, 21450.95, 21625.84, 21564.58, 21407.21, 21240, 20988.5, 
##     21124.37, 21246, 21238.47, 21333.42, 21444.41, 21626.31, 21543.8, 21328.36, 
##     21920.89, 21776.28, 21453.53, 21248.45, 21234.92, 20779.94, 20441.35, 20112.94, 
##     20027.34, 20003.21, 20050.66, 20351.13, 20543.92, 20791.49, 20966.73, 21386.89, 
##     21944.4, 21923.87, 21877.92, 21788.72, 21903.04, 21985.6, 21739.45, 21532.53, 
##     21232.89, 21030.08, 20660.88, 20432.97, 20266.93, 19885.41, 19034.93, 18391.03, 
##     18361.81, 18202.56, 18090.49, 17863.64, 17871.93, 17852.67, 17441.3, 17117.66, 
##     17164.53, 17715.73, 18039.6, 17848.37, 17916.65, 18220.08, 18775.2, 19112.11, 
##     19521.56, 19813.27, 20044.3, 19880.75, 20078.42, 19934.33, 19304.57, 19077.58, 
##     19369.1, 19556.24, 19327.47, 19360.6, 19504.08, 19505.15, 19324.39, 19217.47, 
##     19294.98, 19072.71, 19071.35, 18961.3, 18675.94, 18481.16, 18212.5, 18102.88, 
##     18296.44, 18578.93, 18802.12, 19157.47, 19947.69, 20532.27, 20610.35, 20466.67, 
##     20301.93, 20530.58, 20744.01, 20872.95, 20948.11, 20749.12, 20553.35, 19508.39, 
##     19122.49, 19023.48, 18818.18, 18670.52, 18929.57, 18897.22, 18479.07, 18640.31, 
##     18984.97, 18938.54, 18738.63, 18881.39, 18898.86, 18886.33, 18682.42, 18315.78, 
##     18432.9, 18251.18, 18124.82, 18187.62, 18502.97, 18793.55, 19074.55, 19394.53, 
##     20036.92, 20049.98, 19996.69, 19920.82, 19537.94, 19628.1, 20229.72, 20542.1, 
##     20848.13, 21046.63, 20559.6, 19876.85, 19717.53, 19638.52, 19445.61, 18758.52, 
##     18556.07, 18596.54, 18815.4, 18685.41, 18739.94, 18769.21, 18229.85, 18080.37, 
##     18081.81, 18255.37, 18282.53, 18127.37, 18065.99, 18164.7, 18894.06, 19295.05, 
##     19786.17, 19885.92, 19683.89, 19746.75, 19941.33, 20313.97, 19783.83, 19809.35, 
##     19923.84, 19813.77, 19703.43, 19591.83, 19602.65, 19307.75, 19201.47, 19166.7, 
##     18970.5, 18770.52, 18816.42, 18636.58, 18471.55, 18534.9, 18572.42, 18405.08, 
##     18517.41, 18804.6, 19123.54, 19619.18, 20306.09, 21330.14, 21722.75, 21644.69, 
##     21647.55, 21706.63, 21620.56, 21605.59, 21683.84, 21512.95, 21003.57, 20165.94, 
##     19896.1, 19568.24, 19305.24, 19262.77, 19160.89, 19211.09, 19624.03, 19386.36, 
##     19407.53, 19383.47, 19301.93, 19357.84, 19420.26, 19495.04, 19568.23, 19516.96, 
##     19834.69, 19972.81, 19854.82, 19757.22, 20193.67, 20544.94, 20795.48, 21088.49, 
##     21697.58, 22190.35, 22234.22, 22237.84, 22201.78, 21912.72, 21738.63, 21148.62, 
##     21396.79, 21386.69, 21350.88, 21066.51, 21027.89, 20627.72, 20099.31, 19445.65, 
##     19009.16, 18776.07, 18890.31, 18652.58, 18541.16, 18526.26, 18604.27, 18748.38, 
##     18960.71, 18825.47, 18465.49, 18604.97, 19150.89, 19728.74, 19863.55, 20070.73, 
##     20827.37, 21203.05, 21465.16, 21618.05, 21567.66, 21872.74, 21695.97, 21527.18, 
##     21530.57, 21328.4, 21369.06, 21246.77, 20959.3, 20754.01, 20451.52, 19935.47, 
##     19575.83, 19385.43, 19431.28, 19565.13, 19454.52, 19551.06, 19742.83, 19765.81, 
##     19788.05, 19709.99, 19805.73, 19776.7, 20471.98, 20957.92, 21141.48, 21661.96, 
##     21854.95, 21859.64, 21925.44, 21751.32, 21864.61, 21364.97, 20876.42, 20177.2, 
##     20065.02, 20028.08, 19765.67, 19681.23, 19578.05, 19543.02, 19605.95, 19841.96, 
##     19923.71, 19764.32, 19824.46, 20002.7, 20067.85, 20061.62, 20159.94, 19918.19, 
##     19945.12, 19803.34, 19765.08, 19773.59, 20116.17, 20961.53, 21663.58, 21786.47, 
##     22318.7, 22498.41, 22419.74, 22249.54, 22038.97, 22164.84, 22029.55, 21678.52, 
##     21665.57, 21477.29, 20994.46, 20655.38, 20606.22, 20595.41, 20311.26, 19609.14, 
##     19493.77, 19225.75, 18838.13, 18763.45, 19065.89, 19195.47, 18737.52, 18609.5, 
##     18533.16, 18508.24, 18518.65, 18611.83, 18741.72, 18737.93, 18852.24, 18820.88, 
##     19300.69, 19461.64, 19654.11, 19833.11, 19833.17, 19769.29, 19584.56, 19287.81, 
##     19109.45, 19437.91, 19551.31, 19283.53, 19551.26, 19587.11, 19589.01, 19342.44, 
##     19264.82, 19223.3, 19109.72, 18999.64, 19065.79, 19330.64, 19419.46, 19400.37, 
##     19162, 19234.37, 19650.48, 19886.38, 20467.19, 21067.91, 21527.02, 21833.07, 
##     22191.25, 21953.5, 21767.54, 21736.98, 21915.2, 21510.33, 21384.44, 21130.67, 
##     21248.25, 21331.54, 21312.21, 21571.09, 21506.21, 21160.85, 21184.41, 21024.21, 
##     21410.04, 21564.92, 21298.16, 21409.08, 21367.62, 21307.06, 21308.81, 20830.61, 
##     20941.44, 21276.43, 21567.01, 21408.52, 21852.98, 22086.9, 22120.56, 22096.66, 
##     22241.28, 22017.82, 22255.58, 22416.15, 22062.27, 22425.26, 21941.87, 21321.81, 
##     21171.21, 20899.4, 20536.46, 20288.23, 20197.35, 20207.06, 19737.24, 19162.1, 
##     19004.87, 18693.44, 18390.61, 18762.42, 18777.67, 18792.27, 18597.15, 18334.29, 
##     18335.22, 18194.67, 18109.13, 18095.2, 18175.7, 18302.6, 18266.69, 18810.87, 
##     19174.24, 19462.65, 20023.86, 20255.21, 20342.97, 20367.34, 19974.67, 20174.67, 
##     20426.53, 20096.86, 20010.51, 19934.76, 19915.75, 19816.97, 19552.52, 19531.58, 
##     19858.08, 19914.68, 20047.86, 20449.82, 20560.55, 20506.62, 20535.67, 20497.38, 
##     20532.19, 20356.57, 20352.97, 20621.94, 21029.03, 21491.3, 21738.31, 21809.36, 
##     21824.27, 21537.32, 21443.5, 21652.65, 21879.16, 22145.25, 21770.55, 21144.26, 
##     20756.37, 20422.7, 20323.16, 20121.18, 20108.28, 20076.72, 19843.88, 19917.6, 
##     20082.26, 19859.19, 19912.95, 20099.07, 20353.88, 20529.86, 20384.88, 20273.55, 
##     20548.98, 20556.22, 20471.39, 20551.09, 20678.13, 20605.21, 20313.03, 20426.6, 
##     20657.63, 20959.17, 20965.95, 20947.37, 20633.84, 20655.57, 20792.14, 20522.98, 
##     20527.85, 20048.44, 19468.07, 19074.97, 18643.19, 18348.27, 17895.93, 17410.99, 
##     17035.03, 16728.06, 16298.17, 16542.78, 17120.48, 17758.16, 17871.71, 17650.82, 
##     17774.45, 18066.79, 17762.07, 17323.28, 17413.73, 17740.54, 18438.32, 18960.57, 
##     19393.91, 19673.52, 19628.14, 19766.19, 19805.82, 19458.31, 18765.82), .Tsp = c(1, 
##     30.9895833333333, 96), class = "ts")), class = "data.frame", row.names = c(NA, 
##     -2880L)))
## 
## Coefficients:
##          ar1     ar2     ar3     ar4     ma1      ma2      ma3      ma4
##       0.1711  0.0604  0.3927  0.0335  0.0708  -0.1234  -0.4288  -0.2454
## s.e.  0.1718  0.1546  0.1423  0.1127  0.1706   0.1349   0.1366   0.1070
## 
## sigma^2 estimated as 69229:  log likelihood = -19453.24,  aic = 38924.48

Questions: - What are the ARIMA orders? - How many lags were used? - Was differencing performed? - Were any lagged error features used? - Did modeltime auto-generate a frequency for ARIMA? - Is this a seasonal model?

Model 2 - Add weekend Events

Next, repeat the model this time adding events:

  • Modify the previous formula to include event_may_weekend and event_weekend_launch
  • Store the object as model_fit_2_arima_xregs
  • Print the output to the screen.

Questions: - Has the AIC improved? - What coefficients do you see in your model? - Is this a seasonal model?

#model_fit_2_arima_xregs <- arima_reg() %>%
#    set_engine("auto_arima") %>%
#    fit(total_drawl ~ timestamp 
#        + sunday
#       + saturday, 
#      data = training(splits))

#write_rds(model_fit_2_arima_xregs, "data/model_fit_2_arima_xregs.rds")

# Checkpoint data
model_fit_2_arima_xregs <- read_rds("data/model_fit_2_arima_xregs.rds")

model_fit_2_arima_xregs
## parsnip model object
## 
## Fit time:  41m 24.9s 
## 
## Call:
## forecast::auto.arima(y = outcome, max.p = max.p, max.q = max.q, max.P = max.P, 
##     max.Q = max.Q, max.d = max.d, max.D = max.D, xreg = xreg_matrix, x = structure(list(
##         x = structure(c(18630.18, 19413.84, 19426.54, 19459.81, 19114.68, 18813, 
##         18581.31, 18381.33, 18285.86, 18781.02, 19000.5, 18896.72, 18686.42, 
##         18843.18, 18843.71, 18857.42, 18704.38, 18767.91, 18641.87, 18954.08, 
##         19277.41, 19946.77, 20499.77, 21056.07, 20897.11, 21190.8, 20924.82, 
##         20495.24, 20024.03, 19804.71, 19961.11, 19787.25, 19371.37, 19625.5, 
##         19839.44, 19758.76, 19809.16, 20260.54, 20197.41, 20217.21, 20271.12, 
##         20134.95, 20072.87, 19895.45, 19951.84, 19935.35, 19800.44, 19726.35, 
##         19589.14, 19815.66, 19670.6, 19474.16, 19658.92, 20177.11, 20434.8, 
##         20765.43, 20992.74, 21291.26, 21326.11, 21026.15, 20927.02, 21043.5, 
##         20898.71, 20508.45, 19996.91, 20274.58, 20235.29, 20331.02, 20340.24, 
##         19888.86, 18887.01, 18126.21, 17602.79, 17303.62, 17424.43, 17659.13, 
##         17750.03, 17849.92, 18015.21, 17330.85, 16901.02, 16991.04, 16853.98, 
##         16917.47, 16827.37, 17030.69, 17377.28, 17510.42, 17920.41, 18756.1, 
##         19075.72, 19419.34, 19628.63, 19457.91, 19587.23, 19405.64, 19089.07, 
##         19085.95, 18926.14, 18768.63, 18502.45, 18150.08, 18085.68, 18044.42, 
##         17998.97, 18166.02, 18145.24, 18039.86, 17903.03, 17942.95, 17814.23, 
##         17494.08, 17329.08, 17267.96, 17263.92, 17707.87, 18108.23, 18747.38, 
##         18991.27, 19095.52, 19260.19, 19575.33, 19905.32, 19997.56, 20289.26, 
##         20619.73, 20793.44, 20588.98, 20340.94, 20307.83, 20083.46, 19807.48, 
##         19511.13, 19510.72, 19746.2, 19682.35, 19611.43, 19566.57, 19447.49, 
##         19557.6, 19869.43, 20352.44, 20289.78, 19756.42, 19468.66, 19485.51, 
##         19423.66, 19618.38, 19499.95, 19436.88, 19555.23, 19540.65, 19584.54, 
##         19717.32, 19687.83, 19724.02, 20198.26, 20335.78, 20471.07, 20591.88, 
##         20340.48, 20423.76, 20188.24, 19800.17, 19690.68, 19386.21, 18785.88, 
##         18394.91, 17891.17, 17913.29, 17933.87, 18210.53, 18141.86, 18283.66, 
##         18267.8, 17840.17, 17745.49, 17837.81, 17845.65, 17725.95, 17501.98, 
##         17578.68, 17853.41, 17940.6, 18428.95, 19397.14, 19940.53, 20291.19, 
##         20335.88, 20366.37, 20535.15, 20338.7, 20109.53, 20300.55, 20117.82, 
##         20179.27, 19793.93, 19261.93, 18928.22, 18433.93, 18316.72, 18517.68, 
##         18408.52, 18407.69, 18090.38, 18019.1, 18311.26, 18371.38, 18156.74, 
##         17998.37, 17970.99, 18211.16, 18689.45, 19066.02, 19698.7, 20142.68, 
##         20312.23, 20758.96, 20646.02, 20677.4, 20461.3, 20992.29, 21126.28, 
##         20987.85, 20586.68, 20572.69, 20592.85, 20704.2, 20361.23, 20490.23, 
##         20423.11, 20507.98, 20934.44, 20936.96, 20746.02, 20853.96, 20890.07, 
##         21134.99, 21044.94, 20947.61, 20523.65, 20721.78, 20513.64, 19956.94, 
##         19885.48, 20096.73, 20036.83, 20289.97, 20240.84, 20466.32, 20498.95, 
##         20390.35, 20492.63, 20557.56, 20349.44, 20045.69, 19762.4, 19683.9, 
##         19640.33, 19520.49, 19240.29, 19323.99, 18910.44, 18608.13, 17697.94, 
##         17424.44, 17113.64, 16993.23, 17009.99, 17370.17, 17601.58, 17184.55, 
##         16663.2, 16853.18, 17155.55, 17091.81, 16834.61, 16994.49, 17315.83, 
##         17621.01, 18052.28, 18760.35, 18969.62, 19065.28, 19233.48, 19410.91, 
##         19287.53, 19015.38, 18689.59, 18604.76, 18967.54, 19151.2, 19096.54, 
##         18914.98, 18342.5, 18245.27, 18086.36, 17990.72, 18048.56, 17894.52, 
##         17897.01, 17836.71, 18039.06, 17930.37, 17918.51, 18117.04, 17983.83, 
##         18008.32, 17933.19, 18204.26, 18860.11, 19545.99, 19495.14, 19594.3, 
##         19210.8, 19159.85, 19116.15, 19591.85, 19567.97, 19394.06, 19121.62, 
##         19177.13, 19048.26, 18618.13, 18625.01, 18942.12, 18679.16, 18727.06, 
##         19005.48, 19463.03, 19590.07, 19632.56, 19944.68, 20366.4, 20348.23, 
##         20267.14, 19558.4, 19653.89, 19521.61, 19380.4, 19248.26, 19676.34, 
##         20117.65, 20464.73, 20664.82, 21190.91, 21561.84, 21559.87, 21679.57, 
##         21510.02, 21380.83, 21004.99, 21208.2, 21602.34, 21435.45, 21270.19, 
##         20906.93, 20820.44, 20434.32, 19806.86, 19099.66, 19082.37, 18989.71, 
##         18945.21, 18535.23, 18782.33, 18630.07, 18188.94, 17541.53, 17457.61, 
##         17529.59, 17895.88, 17669.69, 17671.25, 17847.67, 17954.02, 18294.62, 
##         18683.68, 18874.09, 19118.09, 19200.65, 19544.81, 19540.5, 19463.49, 
##         19634.46, 19891.96, 20111.41, 20407.46, 20345.55, 20137.95, 19960.06, 
##         19588.85, 19261.22, 19347.86, 19235.48, 19180.98, 18914.8, 18965.39, 
##         18996.52, 18767.93, 18366.02, 18316.36, 18439.48, 18751.1, 19126.76, 
##         19978.83, 20579.89, 20761.51, 20662.34, 20831.1, 20809.8, 20881.06, 
##         21262.65, 21165.37, 20803.9, 20288.77, 19682.27, 19649.9, 19799.58, 
##         19613.27, 19695.65, 19993.3, 20107.16, 20040.55, 20322.09, 20278.71, 
##         20040.93, 20280.17, 20550.89, 20701.71, 20655.85, 20171.8, 19938.12, 
##         20358.01, 20235.65, 20100.55, 19885.45, 19934.13, 20245.77, 20403.95, 
##         20430.03, 20994.41, 21335.82, 21251.42, 21428.96, 21382.72, 21452.34, 
##         21472.21, 21314.41, 21333.48, 21250.01, 21107.57, 20884.01, 20475.34, 
##         20084.77, 19455.52, 18804.79, 18610.75, 18484.35, 18639.54, 18737.2, 
##         18541.06, 17985.02, 17734.94, 17324.48, 17273.48, 17463.84, 17739.96, 
##         18004.02, 17803.81, 18260.02, 18228.66, 18574.1, 19341.29, 19811.31, 
##         20024.17, 20096.93, 20293.76, 20294.97, 20245.98, 20225.51, 20430.69, 
##         20653.41, 20513.57, 20212.71, 20056.14, 19767.46, 19632.27, 19256.4, 
##         19166.25, 19019.54, 18893.08, 18865.51, 18977.26, 19207.24, 19032.95, 
##         18909.97, 18915.58, 18877.86, 18920.22, 19016.18, 19814.69, 20812.94, 
##         21395.14, 21626.65, 22068.93, 22237.74, 22087.07, 22196.72, 22315.8, 
##         21820.37, 21434.93, 20780.78, 20814.79, 20795.83, 20796.33, 20635.01, 
##         20498.8, 20480.65, 20275.43, 20277.09, 20162.72, 20305.12, 20546.88, 
##         20763.71, 21120.08, 21284.3, 21345.85, 20952.54, 21218.29, 21200.6, 
##         21109.88, 20733.88, 20621.86, 21029.17, 21273.15, 20993.9, 21207.77, 
##         21345, 21752.83, 22247.54, 22342.62, 22037.99, 21630.73, 21204.21, 21462.13, 
##         21125.82, 20834.85, 20378.12, 19848.75, 19442.75, 19140.5, 18635.84, 
##         18342.7, 18252.7, 18259.47, 18582.49, 19016.84, 19173, 18816.79, 17594.79, 
##         17129.87, 17045.35, 17497.64, 17772.63, 17536.93, 17712.77, 18114.67, 
##         18816.32, 19461.63, 20045.89, 20005.81, 20272.23, 20350.28, 20262.97, 
##         20331.99, 20419.92, 20341.29, 20281.36, 20396.78, 20441.3, 20428.6, 
##         20141.29, 19803.1, 19649.49, 19435.69, 19266.19, 19299.79, 19177.02, 
##         19290.19, 19522.13, 19344.4, 19043.73, 19145.07, 19255.74, 19437.7, 
##         19680.98, 20294.35, 21060.76, 21777, 21613.16, 21884.45, 22066.45, 22169.23, 
##         22323.45, 22467.31, 22281.33, 21929.66, 21305.68, 21103.63, 21033.99, 
##         21123.05, 21162.89, 21403.24, 21426.92, 21266.2, 21284.99, 21413.89, 
##         21338.99, 21133.42, 21160.21, 21396.39, 21235.43, 21045.26, 20660.22, 
##         20677.37, 21053.88, 21056.12, 21120.18, 21108.66, 21440.25, 21882.2, 
##         22060.49, 22304.65, 22427.1, 22263.81, 22038.63, 21876.76, 21690.65, 
##         21613.77, 21693.36, 21582.78, 21324.48, 20776.32, 20629.68, 20459.98, 
##         20155.65, 19602.47, 19120.08, 19323.42, 19299.14, 19167.36, 18509.92, 
##         18351.01, 18295.51, 17908.21, 17711.97, 18028, 17734.15, 17406.95, 17310.11, 
##         17500.85, 17586.91, 17995.36, 18322.07, 19318.48, 19828.01, 19761.72, 
##         19375.35, 19266.93, 19130.03, 19125.35, 19208.75, 19370.79, 19286.56, 
##         19304.03, 18990.36, 19014.41, 19054.6, 18811.5, 18388.43, 18547.89, 
##         18193.3, 18448.38, 18410.84, 18395.29, 18354.53, 18174.42, 18117.74, 
##         18107.74, 18162.31, 18466.35, 19002.85, 19744.83, 20533.39, 20872.45, 
##         20530.31, 20818.92, 21127.23, 20788.8, 20726.55, 21257.48, 21225.27, 
##         21091.87, 20707.83, 20902.64, 20850.57, 20792.02, 20532.79, 20581.34, 
##         20612.43, 20517.63, 20640.57, 20822.89, 20797.54, 20646.56, 20998.91, 
##         21013, 21004.2, 20903.21, 20523.36, 21017.97, 21152.79, 21074.04, 20948.19, 
##         21264.15, 21750.16, 21698.25, 21804.47, 22058.22, 22281.55, 22684.43, 
##         22950.62, 22911.54, 22693.68, 22474.03, 22325.58, 21863.09, 21265.51, 
##         20512.7, 20430.1, 20614.61, 20490.3, 19900.14, 19178.91, 18785.39, 18503.18, 
##         17758.75, 17585.82, 17749.7, 17459.01, 17420.75, 17228.89, 17258.61, 
##         17351.19, 17287.57, 17136.78, 17183.31, 17072.03, 16957.77, 17399.89, 
##         17806.73, 18137.5, 18381.05, 18517.4, 18764.39, 19041.86, 19072.2, 19308.04, 
##         19505.48, 19782.33, 19913.18, 19839.52, 19596.05, 19196.69, 18878.25, 
##         18303.21, 18373.05, 18033.39, 17973.32, 17945.03, 18128.2, 18161.8, 
##         18058.86, 18087.03, 18050.17, 18279.59, 18557.34, 18789.62, 19445.64, 
##         20080.44, 20199.33, 20513.59, 20906.9, 20880.92, 20791.92, 21030.89, 
##         20879.83, 20877.02, 20532.57, 20075.14, 19950.6, 19848.27, 19317.14, 
##         19208.8, 19395.56, 19479.62, 19364.27, 19418.61, 19580.72, 19341.99, 
##         19335.19, 19498.19, 19625.96, 19569.96, 19394.94, 19027.42, 19213.92, 
##         19313.19, 19171.87, 19150.43, 19527.5, 19614.42, 19266.1, 18776.68, 
##         19105.28, 19517.74, 19693.56, 19882.25, 19604.68, 19251.02, 19515.26, 
##         19018.56, 18618.65, 18324.94, 17765.29, 17363.41, 17149.94, 16634.81, 
##         16407.28, 16039.38, 16066.24, 16267.08, 16044.27, 15551.65, 15736, 15603, 
##         15105.91, 14802.35, 14937.88, 15243.14, 15562.86, 15652.61, 16341.93, 
##         17001.05, 17130.2, 17720.89, 18382.82, 18890.81, 18976.11, 19186.95, 
##         19397.61, 19544.16, 19330.16, 18958.97, 18948.88, 18627.14, 18394.43, 
##         18281.51, 17857.44, 17356.84, 17118.56, 16691.2, 16903.74, 16827.93, 
##         16891.11, 17088.99, 17117.65, 17243.66, 17381.92, 17433.35, 17425.11, 
##         17580.74, 17649.98, 18106.17, 18797.46, 19287.16, 19852.61, 20147.62, 
##         20616.3, 20801.14, 20821.32, 20738.34, 20915.33, 20784.44, 20513.2, 
##         19820.19, 19619.18, 19773.57, 19702.06, 19886.23, 20057.08, 20109.22, 
##         19932.03, 20142.15, 20264.16, 20197.58, 20180.9, 20159.69, 20136.73, 
##         20237.59, 20340.95, 20008.92, 19916.12, 19542.68, 19630.16, 19598.46, 
##         19834.13, 20050.25, 20513, 20799.68, 21041.81, 21105.98, 21236.67, 21664.95, 
##         21633.21, 21388.58, 21055.39, 21145.91, 20933.46, 20818.9, 20545.79, 
##         20169.54, 19806.16, 19669.24, 18883.46, 18075.6, 17759.96, 17446.09, 
##         17527.16, 17620.79, 17872.58, 17964.88, 17598.45, 17087.38, 17249.57, 
##         17271.81, 17034.15, 16738.57, 16820.74, 16898.98, 17117.44, 17362.29, 
##         17886.25, 18450.2, 18675.57, 18747.91, 19043.29, 18986.57, 18954.3, 
##         19019.42, 19230.03, 19364.98, 19194.3, 18925.75, 18463.06, 17914.67, 
##         17812.96, 17652.76, 17666.85, 17673.79, 17760.28, 17763.29, 17821.41, 
##         17804.82, 17567.18, 17479.95, 17003.29, 16905.85, 17196.14, 17653.05, 
##         18496.76, 19050.72, 19143.54, 19217.55, 19187.17, 18926.94, 18753.65, 
##         18727.34, 18906.9, 18666.96, 18295.71, 18085.76, 17709.98, 17806.29, 
##         17922.68, 17928.18, 18035.08, 17927.68, 18083.37, 18319.35, 18558.25, 
##         18537.78, 18439.23, 18684.57, 18816.35, 18878.1, 18666.98, 18361.42, 
##         18542.74, 18624.95, 18781.42, 18807.87, 18890.71, 19163.6, 19419.33, 
##         19600.79, 19737.07, 19681.26, 19770.07, 19800.04, 19979.96, 19993.63, 
##         20327.72, 20182.21, 20007, 19567.01, 19178.55, 18784.29, 18295.01, 18001.49, 
##         17476.35, 16914.59, 16863.46, 16844.49, 16977.09, 16973.01, 17712.28, 
##         17749.02, 17567.01, 17266.99, 17263.29, 17321.13, 17445.61, 17165.5, 
##         17006.13, 17306.75, 17443.99, 17874.12, 18477.84, 18666.08, 19310.51, 
##         19244.58, 19370.26, 19403.61, 19463.24, 19332.01, 19163.15, 18972.86, 
##         18961.17, 18811.22, 18813.76, 18539.17, 18277.2, 18183.77, 17896.46, 
##         17922.81, 17997.34, 17829.31, 17502.18, 17602.35, 17832.07, 17795.01, 
##         17654.65, 17641.02, 17993.61, 18296.86, 19150.36, 19914.15, 20073.45, 
##         20063.87, 20616.01, 20575.55, 20302.84, 20354.71, 20023.36, 19690.01, 
##         19307.52, 18883.51, 18888.03, 18791.14, 18752.92, 18644.34, 18747.02, 
##         18809.71, 18883.63, 18920.17, 18845.69, 18733.66, 18675.8, 18898.81, 
##         19098.73, 18845.59, 18410.69, 18100.99, 18368.83, 18399.69, 18177.77, 
##         17997.51, 18362.46, 18195.05, 18305.85, 18548.78, 18809.67, 18972.51, 
##         19043.18, 19392.12, 19340.58, 19438.06, 19482.18, 19038.22, 19217.61, 
##         19259.14, 19337.27, 19087.84, 18842.02, 18566.95, 18181.34, 17551.75, 
##         17263.05, 16987.02, 16533.42, 16309.62, 16273.74, 16055.68, 15817.1, 
##         15365.3, 15282.72, 15363.84, 15523.49, 15790.71, 16015.42, 16155.1, 
##         16107.71, 16387.44, 17085.74, 18057.96, 18110.47, 17967.82, 18008.27, 
##         18175.52, 18240.45, 18130.14, 18056.43, 17854.74, 17919.87, 17659.63, 
##         17593.16, 17709.22, 17378.19, 17316.82, 17734.79, 17680.44, 17828.37, 
##         17877.92, 18098.46, 17997.57, 18115.75, 18144.01, 18271.61, 18289.96, 
##         18367.97, 18685.36, 19206.57, 19874.22, 20127.44, 19911.69, 19991.6, 
##         20091.38, 20044.37, 20185.75, 20203.01, 20200.19, 19932.23, 19248.65, 
##         19109.52, 19382.41, 19589.46, 19519.78, 19407.96, 19586.05, 19770.81, 
##         19846.56, 20135.43, 19986.55, 20066.33, 20055.2, 19791.13, 19337.98, 
##         19192.69, 18961.38, 19079.64, 18869.13, 18787.27, 18502.43, 18819.03, 
##         19078.87, 18902.73, 19278.33, 20024.49, 20537.32, 20713.02, 20457.22, 
##         20680.02, 20423.13, 20730.24, 20797.65, 20623.91, 20672.75, 20635.41, 
##         20158.43, 19740.51, 19111.09, 18367.17, 17588.84, 17540.3, 17876.53, 
##         17744.7, 17512.82, 17639.1, 17717.38, 17456.33, 16796.49, 16898.61, 
##         17097.05, 17156.48, 17431.95, 17782.27, 17965.98, 18297.3, 19016.84, 
##         19579.91, 19897.78, 20413.77, 20552.26, 20765.31, 20799.25, 20635.05, 
##         20537.78, 20342.45, 20052.3, 20116.93, 20053.63, 20206.91, 20659.7, 
##         20751.32, 20001.85, 19751.34, 19473.15, 19408.7, 19415.63, 19112.03, 
##         19263.57, 19583.46, 19638.61, 19833.6, 19813.78, 20329.83, 21037.08, 
##         22006.71, 22743.02, 23120.69, 23218.13, 23563.94, 23850.38, 23564.33, 
##         23333.43, 23258.14, 23188.52, 22752.37, 22234, 22200.07, 21606.76, 21524.39, 
##         22544.11, 22778.58, 23036.45, 22994.39, 23225.2, 23407.97, 23111.8, 
##         22574.37, 22200.1, 22265, 21872.38, 21353.68, 20901.71, 21214.73, 20983.53, 
##         20765.46, 20399.07, 20599.21, 20598.17, 20919.27, 21215.52, 21404.68, 
##         21621.41, 21864.5, 22022.52, 22170.16, 22203.17, 22320.02, 22008.86, 
##         22023.1, 21624.28, 21298.19, 21233, 21063.1, 20703.16, 20179.69, 19260.51, 
##         18694.31, 18402.34, 18235.31, 18120.38, 18408, 18256.73, 18270.24, 17914.87, 
##         17983.75, 17790.06, 17832.22, 18203.01, 18437.91, 18615.56, 18866.54, 
##         19253.58, 19957.7, 20249.09, 20454.54, 20515.55, 21009.49, 21160.59, 
##         20995.35, 20880.6, 21083.25, 21118.04, 21165.88, 20967.06, 20643.26, 
##         20500.54, 20289.48, 19993.39, 19910.46, 19672.47, 19630.13, 19741.18, 
##         19681.6, 19492.28, 19405.23, 19811.94, 19722.29, 19600.44, 19992.36, 
##         20387.63, 21459.46, 21914.19, 22369.02, 22487.49, 22823.51, 22920.89, 
##         22644.14, 22288.52, 22224.27, 21917.24, 21514.09, 20988.66, 21122.93, 
##         21141.07, 20959.85, 20987.55, 21148.64, 21328.04, 21226.66, 21297.04, 
##         21490.31, 21616.48, 21859.77, 22104.05, 22461.02, 22546.69, 22050.95, 
##         21526.6, 21701.56, 21547.57, 21360.91, 21233.99, 21183.48, 21166.6, 
##         21366.33, 21842.21, 22057.98, 22499.99, 23145.54, 23493.79, 23571.06, 
##         23678.93, 23459.22, 23430.69, 23374.62, 23134.81, 22642, 22285.55, 21789.74, 
##         21229.43, 20878.85, 20220.03, 20293.97, 20178.37, 19882.4, 19762.67, 
##         19677.69, 19544.52, 19064.67, 18250.31, 18307.4, 18392.82, 18233.73, 
##         18376.06, 18729.36, 19036.83, 19339.01, 19814.39, 20290.66, 20465.2, 
##         20403.9, 20802.1, 20744.79, 20698.11, 20590.67, 20324.31, 20767.19, 
##         20929.22, 20736.49, 20615.65, 20401.28, 19870.34, 19479.26, 18707.66, 
##         18502.52, 18270.13, 18287.08, 18112.23, 17980.91, 17872.28, 17731.12, 
##         17561.68, 17496.12, 17677.09, 18070.12, 18749.45, 19161.59, 19219.57, 
##         19474.42, 19424.65, 19574.18, 19286.96, 18968.33, 19002.38, 19032.34, 
##         19059.37, 19111.29, 18796.55, 18829.35, 18344.45, 18016.76, 17936.5, 
##         17853.9, 18175.65, 18589.65, 18650.37, 18684.45, 18688, 18427.17, 18597.56, 
##         18574.65, 18362.37, 18250.84, 17901.32, 17722.78, 17529.95, 17628.84, 
##         17654.74, 17640.96, 17747.36, 17819.81, 17698.79, 17323.82, 17221.57, 
##         17720.49, 17750.43, 17470.13, 17253.81, 17086.22, 17314.21, 16730.86, 
##         15946.06, 15339.73, 14824.91, 14722.66, 14311.28, 14185.39, 14056.04, 
##         14227.64, 13957.79, 13756.96, 13707.89, 13744.82, 13801.14, 13369.54, 
##         13617.03, 13592.06, 13352.54, 13677.48, 13637.83, 13820.22, 13605.06, 
##         13540.25, 13900.22, 14579.97, 14867.78, 15052.04, 15330.75, 15559.16, 
##         15491.72, 15431.59, 15211.1, 15107.64, 15115.29, 14997.65, 14806.37, 
##         14683.38, 14773.58, 14609.81, 14364.36, 14375.7, 14411.71, 14248.86, 
##         14146.39, 13967.17, 13824.95, 14265.51, 14125.92, 14013.75, 13824.1, 
##         13870.62, 13900.4, 14190.36, 14588.3, 14709.27, 14762.76, 14943.17, 
##         14939.74, 14939.37, 14896.18, 14632.29, 14441.63, 14493.98, 14045.45, 
##         14290.97, 14179.12, 13833.47, 13820.27, 13541.26, 13177.71, 13153.86, 
##         13448.59, 13456.01, 13499.59, 13671.62, 13297.99, 13289.16, 13298.42, 
##         13082.67, 12841.25, 12737.3, 12579.18, 12499.5, 12228.38, 12584.6, 12585.01, 
##         12826.35, 13270.41, 13609.71, 13870.63, 13987.58, 13974.83, 13610.81, 
##         12942.9, 12807.32, 12994.82, 13043.42, 12935.38, 12656.04, 12699.06, 
##         12814.45, 12611.6, 12379.99, 11944.14, 11893.42, 11941.85, 12474.2, 
##         12477.41, 13064.92, 12944.95, 12381.72, 12116.44, 12076.94, 12025.01, 
##         12045.14, 12170.61, 12188.64, 12551, 12506.17, 12767.66, 13133.46, 13095.83, 
##         13196.68, 13220.06, 13293.04, 13529.41, 13367.19, 13080.15, 13283.11, 
##         13011.9, 13010.93, 13266.66, 13270.75, 12950.41, 12795.41, 12620, 12689.02, 
##         12544.58, 12358.02, 12127.7, 12187.37, 12225.27, 12210.94, 12053.35, 
##         12087.73, 12437.37, 12589.93, 12682.8, 13006.65, 13400.51, 13676.59, 
##         13735.66, 13718.91, 13591.7, 13342.74, 13462.97, 13708.61, 13621.41, 
##         13700.07, 13700.27, 13745.89, 13630.08, 13780.62, 13936.12, 14087.8, 
##         13769.93, 13427.26, 13208.37, 13075.96, 13175.21, 13147.29, 13026.48, 
##         12962.82, 12570.63, 12154.06, 11704.82, 11695.93, 11754.36, 11526.4, 
##         11683.72, 12037.77, 12407.73, 12584.65, 12369.33, 12142.4, 12206.18, 
##         12421.23, 12260.82, 12375.77, 12439.38, 12448.46, 12307.76, 12128.61, 
##         12213.02, 12339.53, 12151.6, 12037.83, 12041.64, 11951.36, 11633.04, 
##         11673.6, 11840.46, 11731.43, 11918.39, 12202.55, 12014.09, 11798.28, 
##         11841.64, 11886.77, 11838.26, 12048.62, 12105.2, 12393.83, 12800.83, 
##         12792.07, 12659.74, 13210.27, 13410.58, 13251.07, 13264.94, 13184.83, 
##         13405.12, 13179.39, 13105.8, 12939.77, 13030.96, 13083.19, 12859.83, 
##         12794.06, 12785.62, 12579.34, 12420.69, 12347.31, 12286.45, 12210.18, 
##         12134.48, 11894.45, 11877.87, 11737.96, 11968.3, 11859.73, 12072.07, 
##         12268.64, 12460.24, 12924.85, 13398.04, 13848.04, 13876.49, 14137.35, 
##         13944.04, 13800.57, 13911.44, 14227.73, 14364.34, 14288.35, 13837.42, 
##         13929.16, 13729.32, 13634.34, 13593.98, 13701.75, 13561.31, 13681.57, 
##         13760.61, 13801.05, 13594.76, 13559.76, 13551.56, 13629.3, 13660.28, 
##         13550.02, 13553.12, 13807.47, 13920.48, 13591.92, 13478.51, 13517.68, 
##         13336.71, 13509.78, 13486.38, 13375.74, 13522.23, 13810.01, 13810.94, 
##         13368.52, 13274.03, 13672.04, 13811.24, 14290.35, 14758.53, 14932.49, 
##         14821.98, 14755.68, 15047.95, 15314.82, 15481.83, 15370.51, 15117.11, 
##         15143.79, 15358.93, 16218.67, 16524.81, 16302.59, 16240.01, 16057.47, 
##         16215.58, 15684.04, 15362.09, 15684.7, 16037.06, 16083.4, 16264.23, 
##         16737.16, 16868.49, 17158.9, 17248.46, 17307.52, 17171.64, 16858.6, 
##         16798.99, 16709.52, 16672.01, 16794.09, 16698.01, 16389.78, 16292.36, 
##         16086.02, 16125.61, 16143.33, 16132.47, 16131.34, 16051, 15915.95, 15819.17, 
##         15626.2, 15590.65, 15888.99, 15931.82, 16192.02, 16337.93, 16560.28, 
##         17100.17, 17503.99, 17523.13, 17654.56, 17674.76, 17630.04, 17522.87, 
##         17709.34, 17893.69, 17578.91, 17166.27, 17473.69, 17222.36, 17071.34, 
##         17083.82, 16975.88, 16927.01, 16876.2, 16836.43, 16924.96, 16780.87, 
##         16796.18, 16812.8, 16580, 16250.13, 16126.39, 15665.48, 15487.94, 15244.41, 
##         15138.84, 15026.17, 15200.17, 15366.02, 15626.36, 15920.51, 16046.36, 
##         15893.9, 15602.22, 15243.6, 15436.93, 15725, 15988.32, 16028.8, 16400.58, 
##         16795.54, 16656.68, 16575.75, 16568.1, 16465.75, 16495.77, 16213.31, 
##         16194, 16330.26, 16448.99, 16470.75, 16744.7, 16690.73, 16674.59, 16185.65, 
##         16519.62, 16582.25, 16270.86, 16330.01, 16703.77, 17208.72, 17382.25, 
##         17604.16, 18073.69, 18354, 18268.4, 18379.46, 18476.81, 18302.84, 18072.45, 
##         17961.8, 17969.11, 17949.82, 18041.99, 18171.52, 18115.33, 18048.32, 
##         17997.43, 17884.06, 17682.16, 17611.71, 17904.44, 17729.99, 17528.3, 
##         17414.43, 17273.74, 17230.89, 17008.69, 17018.58, 17329.97, 17654.21, 
##         18409.04, 18656.47, 19083.25, 19364.23, 19697.68, 19496.72, 18987.73, 
##         19039.47, 19102.83, 18852.04, 18428.39, 17966.28, 17982.32, 18092.84, 
##         17867.57, 17818.16, 17707.33, 17554.53, 17400.71, 17290.7, 17388.93, 
##         17295.87, 17356.03, 17319.39, 17208.8, 17058.18, 16751.02, 16400.09, 
##         16608.55, 16577.36, 16563.84, 16664.46, 16811.07, 17097.64, 17392.69, 
##         17429.06, 18089.14, 18175.47, 18364.04, 18789.63, 18765.58, 18687.04, 
##         18712.02, 18732.64, 18729.75, 18454.81, 18234.68, 18014.24, 17812.4, 
##         17646.61, 17080.83, 16816.78, 16900.06, 16776.34, 16668.19, 16668.06, 
##         16918.4, 17089.61, 16782.58, 16664.59, 16742.95, 16897.26, 17282.74, 
##         17496.15, 17729.9, 18230.92, 18446.35, 19079.35, 19904.79, 20226.41, 
##         20310.05, 20328.36, 20158.81, 20124.35, 19788.43, 19579.14, 19333.87, 
##         18894.66, 18666.55, 18552.66, 18616.58, 18352.52, 18230.94, 18233.09, 
##         17958.13, 17797.92, 17606.37, 17275.43, 17154.58, 17121.85, 17098.05, 
##         17020.47, 17030.54, 17288.31, 17568.81, 17909.05, 18178.97, 18916.62, 
##         19486.62, 19498.28, 19930.2, 20139.4, 20278.96, 20081.34, 20470.47, 
##         20137.33, 19666.6, 18966.84, 18835.83, 18777.27, 18569.62, 18601.45, 
##         18911.4, 19034.75, 19267.8, 19262.32, 19383.85, 19181.6, 19438.62, 19279.24, 
##         18998.75, 18935.77, 18705.78, 18297.5, 18675.37, 18913.24, 18976.5, 
##         18969.84, 19279.81, 19419.6, 19448.91, 20161.27, 20626, 20428.31, 20627.93, 
##         20572.48, 20872.43, 21039.58, 20833.91, 20475.44, 20558.47, 20391.82, 
##         20116.36, 19764.78, 19446.7, 19258.93, 18666.56, 18523.74, 18217.36, 
##         17922.19, 17598.1, 17361.53, 17661.38, 17894.33, 17360.44, 17524.17, 
##         17747.09, 17750.42, 17764.87, 17780.27, 17807.52, 18001.85, 18113.79, 
##         18318.77, 18921.44, 19614.43, 19521.68, 19463.55, 19562.41, 19370.2, 
##         19352.58, 19231.12, 18723.07, 18850.72, 18513.06, 18419.62, 18389.81, 
##         18088.28, 18103.83, 17811.26, 17845.89, 17809.72, 17564.78, 17314.17, 
##         17212.03, 17253.97, 17318.35, 17468.03, 17497.12, 17447.45, 17666.55, 
##         18260.74, 19004.77, 19637.03, 20194.89, 20454.46, 20762.48, 20725.54, 
##         20555.47, 20508.19, 20359.44, 20009.57, 19966.41, 20176.37, 20164.35, 
##         19821.72, 19678.38, 19734.53, 19589.58, 19783.81, 19666.71, 19872.05, 
##         19851.5, 19656.65, 19877.55, 19949.92, 20105.52, 20174.22, 20045.68, 
##         19937.6, 19819.2, 19761.81, 19497.85, 19484.8, 19628.33, 19893.4, 20125.15, 
##         20311.51, 20578.78, 20831.6, 21127.55, 21332.63, 21310, 21312.48, 21324.83, 
##         21007.82, 20789.23, 20757.35, 20387.78, 20357.15, 20148.91, 19774.01, 
##         19566.34, 19026.83, 18737.47, 18538.15, 18295.51, 18596.57, 19363.75, 
##         19547.24, 19408.55, 18994.41, 18781.34, 18930.02, 19043.16, 19187.53, 
##         19298, 19554.11, 19798.43, 20138.96, 20763.65, 20940.18, 21073.83, 21028.33, 
##         21132.61, 21114.34, 20624.53, 20120.62, 20270.23, 20053.86, 20056.94, 
##         19841.38, 19851.18, 19687, 19656.69, 19280.6, 19082.25, 18979.57, 18659.33, 
##         18474.96, 18371.59, 18382.99, 18403.87, 18397.41, 18123.28, 18247.73, 
##         18645.36, 19342.71, 19998.34, 20754.58, 21147.82, 21389.29, 21405.18, 
##         21423.69, 21620.88, 21931.36, 22024.51, 21876.16, 21562.62, 21049.54, 
##         20962.2, 20718.93, 20808.75, 20999.17, 21093.91, 20761.59, 20405.87, 
##         20483.19, 20523.87, 20563.39, 20783.21, 20779.78, 21009.84, 21078.86, 
##         21103.02, 20787.27, 20634.23, 20486.22, 20303.64, 20091.34, 20260.5, 
##         20680.43, 21126.42, 21284.19, 21762.84, 21790.86, 22087.47, 22306.71, 
##         22153.05, 22344.88, 22627.46, 22244.11, 22265.4, 22324.19, 22179.77, 
##         22105.64, 21623.26, 21259.31, 20853.51, 20284.94, 20330.65, 20279.34, 
##         19737.32, 19125.11, 18658.77, 18414.23, 18308.92, 18073.48, 18116.47, 
##         18346.22, 18397.54, 18596.03, 18880.58, 19182.36, 19236.84, 19511.2, 
##         20043.85, 20561.09, 20708.86, 20525.42, 20486.22, 20395.07, 20159.59, 
##         20005.33, 19859.91, 19673.67, 19768.41, 19370.51, 19072.01, 19045.46, 
##         18940.93, 18925.49, 18982.16, 19038.81, 19006.63, 18833.01, 18690.19, 
##         18615.7, 18761.24, 18394.55, 18399.24, 18450.19, 18405.73, 18809.31, 
##         19579.17, 20286.68, 20915.73, 21058.67, 21451.59, 21586.06, 21450.95, 
##         21625.84, 21564.58, 21407.21, 21240, 20988.5, 21124.37, 21246, 21238.47, 
##         21333.42, 21444.41, 21626.31, 21543.8, 21328.36, 21920.89, 21776.28, 
##         21453.53, 21248.45, 21234.92, 20779.94, 20441.35, 20112.94, 20027.34, 
##         20003.21, 20050.66, 20351.13, 20543.92, 20791.49, 20966.73, 21386.89, 
##         21944.4, 21923.87, 21877.92, 21788.72, 21903.04, 21985.6, 21739.45, 
##         21532.53, 21232.89, 21030.08, 20660.88, 20432.97, 20266.93, 19885.41, 
##         19034.93, 18391.03, 18361.81, 18202.56, 18090.49, 17863.64, 17871.93, 
##         17852.67, 17441.3, 17117.66, 17164.53, 17715.73, 18039.6, 17848.37, 
##         17916.65, 18220.08, 18775.2, 19112.11, 19521.56, 19813.27, 20044.3, 
##         19880.75, 20078.42, 19934.33, 19304.57, 19077.58, 19369.1, 19556.24, 
##         19327.47, 19360.6, 19504.08, 19505.15, 19324.39, 19217.47, 19294.98, 
##         19072.71, 19071.35, 18961.3, 18675.94, 18481.16, 18212.5, 18102.88, 
##         18296.44, 18578.93, 18802.12, 19157.47, 19947.69, 20532.27, 20610.35, 
##         20466.67, 20301.93, 20530.58, 20744.01, 20872.95, 20948.11, 20749.12, 
##         20553.35, 19508.39, 19122.49, 19023.48, 18818.18, 18670.52, 18929.57, 
##         18897.22, 18479.07, 18640.31, 18984.97, 18938.54, 18738.63, 18881.39, 
##         18898.86, 18886.33, 18682.42, 18315.78, 18432.9, 18251.18, 18124.82, 
##         18187.62, 18502.97, 18793.55, 19074.55, 19394.53, 20036.92, 20049.98, 
##         19996.69, 19920.82, 19537.94, 19628.1, 20229.72, 20542.1, 20848.13, 
##         21046.63, 20559.6, 19876.85, 19717.53, 19638.52, 19445.61, 18758.52, 
##         18556.07, 18596.54, 18815.4, 18685.41, 18739.94, 18769.21, 18229.85, 
##         18080.37, 18081.81, 18255.37, 18282.53, 18127.37, 18065.99, 18164.7, 
##         18894.06, 19295.05, 19786.17, 19885.92, 19683.89, 19746.75, 19941.33, 
##         20313.97, 19783.83, 19809.35, 19923.84, 19813.77, 19703.43, 19591.83, 
##         19602.65, 19307.75, 19201.47, 19166.7, 18970.5, 18770.52, 18816.42, 
##         18636.58, 18471.55, 18534.9, 18572.42, 18405.08, 18517.41, 18804.6, 
##         19123.54, 19619.18, 20306.09, 21330.14, 21722.75, 21644.69, 21647.55, 
##         21706.63, 21620.56, 21605.59, 21683.84, 21512.95, 21003.57, 20165.94, 
##         19896.1, 19568.24, 19305.24, 19262.77, 19160.89, 19211.09, 19624.03, 
##         19386.36, 19407.53, 19383.47, 19301.93, 19357.84, 19420.26, 19495.04, 
##         19568.23, 19516.96, 19834.69, 19972.81, 19854.82, 19757.22, 20193.67, 
##         20544.94, 20795.48, 21088.49, 21697.58, 22190.35, 22234.22, 22237.84, 
##         22201.78, 21912.72, 21738.63, 21148.62, 21396.79, 21386.69, 21350.88, 
##         21066.51, 21027.89, 20627.72, 20099.31, 19445.65, 19009.16, 18776.07, 
##         18890.31, 18652.58, 18541.16, 18526.26, 18604.27, 18748.38, 18960.71, 
##         18825.47, 18465.49, 18604.97, 19150.89, 19728.74, 19863.55, 20070.73, 
##         20827.37, 21203.05, 21465.16, 21618.05, 21567.66, 21872.74, 21695.97, 
##         21527.18, 21530.57, 21328.4, 21369.06, 21246.77, 20959.3, 20754.01, 
##         20451.52, 19935.47, 19575.83, 19385.43, 19431.28, 19565.13, 19454.52, 
##         19551.06, 19742.83, 19765.81, 19788.05, 19709.99, 19805.73, 19776.7, 
##         20471.98, 20957.92, 21141.48, 21661.96, 21854.95, 21859.64, 21925.44, 
##         21751.32, 21864.61, 21364.97, 20876.42, 20177.2, 20065.02, 20028.08, 
##         19765.67, 19681.23, 19578.05, 19543.02, 19605.95, 19841.96, 19923.71, 
##         19764.32, 19824.46, 20002.7, 20067.85, 20061.62, 20159.94, 19918.19, 
##         19945.12, 19803.34, 19765.08, 19773.59, 20116.17, 20961.53, 21663.58, 
##         21786.47, 22318.7, 22498.41, 22419.74, 22249.54, 22038.97, 22164.84, 
##         22029.55, 21678.52, 21665.57, 21477.29, 20994.46, 20655.38, 20606.22, 
##         20595.41, 20311.26, 19609.14, 19493.77, 19225.75, 18838.13, 18763.45, 
##         19065.89, 19195.47, 18737.52, 18609.5, 18533.16, 18508.24, 18518.65, 
##         18611.83, 18741.72, 18737.93, 18852.24, 18820.88, 19300.69, 19461.64, 
##         19654.11, 19833.11, 19833.17, 19769.29, 19584.56, 19287.81, 19109.45, 
##         19437.91, 19551.31, 19283.53, 19551.26, 19587.11, 19589.01, 19342.44, 
##         19264.82, 19223.3, 19109.72, 18999.64, 19065.79, 19330.64, 19419.46, 
##         19400.37, 19162, 19234.37, 19650.48, 19886.38, 20467.19, 21067.91, 21527.02, 
##         21833.07, 22191.25, 21953.5, 21767.54, 21736.98, 21915.2, 21510.33, 
##         21384.44, 21130.67, 21248.25, 21331.54, 21312.21, 21571.09, 21506.21, 
##         21160.85, 21184.41, 21024.21, 21410.04, 21564.92, 21298.16, 21409.08, 
##         21367.62, 21307.06, 21308.81, 20830.61, 20941.44, 21276.43, 21567.01, 
##         21408.52, 21852.98, 22086.9, 22120.56, 22096.66, 22241.28, 22017.82, 
##         22255.58, 22416.15, 22062.27, 22425.26, 21941.87, 21321.81, 21171.21, 
##         20899.4, 20536.46, 20288.23, 20197.35, 20207.06, 19737.24, 19162.1, 
##         19004.87, 18693.44, 18390.61, 18762.42, 18777.67, 18792.27, 18597.15, 
##         18334.29, 18335.22, 18194.67, 18109.13, 18095.2, 18175.7, 18302.6, 18266.69, 
##         18810.87, 19174.24, 19462.65, 20023.86, 20255.21, 20342.97, 20367.34, 
##         19974.67, 20174.67, 20426.53, 20096.86, 20010.51, 19934.76, 19915.75, 
##         19816.97, 19552.52, 19531.58, 19858.08, 19914.68, 20047.86, 20449.82, 
##         20560.55, 20506.62, 20535.67, 20497.38, 20532.19, 20356.57, 20352.97, 
##         20621.94, 21029.03, 21491.3, 21738.31, 21809.36, 21824.27, 21537.32, 
##         21443.5, 21652.65, 21879.16, 22145.25, 21770.55, 21144.26, 20756.37, 
##         20422.7, 20323.16, 20121.18, 20108.28, 20076.72, 19843.88, 19917.6, 
##         20082.26, 19859.19, 19912.95, 20099.07, 20353.88, 20529.86, 20384.88, 
##         20273.55, 20548.98, 20556.22, 20471.39, 20551.09, 20678.13, 20605.21, 
##         20313.03, 20426.6, 20657.63, 20959.17, 20965.95, 20947.37, 20633.84, 
##         20655.57, 20792.14, 20522.98, 20527.85, 20048.44, 19468.07, 19074.97, 
##         18643.19, 18348.27, 17895.93, 17410.99, 17035.03, 16728.06, 16298.17, 
##         16542.78, 17120.48, 17758.16, 17871.71, 17650.82, 17774.45, 18066.79, 
##         17762.07, 17323.28, 17413.73, 17740.54, 18438.32, 18960.57, 19393.91, 
##         19673.52, 19628.14, 19766.19, 19805.82, 19458.31, 18765.82), .Tsp = c(1, 
##         30.9895833333333, 96), class = "ts")), class = "data.frame", row.names = c(NA, 
##     -2880L)))
## 
## Coefficients:
##          ma1    sma1   sunday  saturday
##       0.9115  0.1154  32.0724  467.7991
## s.e.  0.0057  0.0183  63.4521   64.5147
## 
## sigma^2 estimated as 756670:  log likelihood = -22792.89,  aic = 45595.79

Model 3 - Add Seasonality + weekend Events

Use plot_acf_diagnostics() to inspect the ACF of your ARIMA model as follows:

  • If a Difference was used in your ARIMA models, then apply differencing using diff_vec()

Question: - Do you see any spikes in ACF Lags? - Do you see any spikes in PACF Lags?

training(splits) %>%
    plot_acf_diagnostics(timestamp, .value = diff_vec(total_drawl))
## diff_vec(): Initial values: 18630.18

Make your 3rd Auto ARIMA model the same as your 2nd model (include events in your model formula). This time:

  • Set arima_reg(seasonal_period = 4) to capture the ACF Lag 4 as a seasonality
  • Store as model_fit_3_arima_sarimax

Question: - Is this a seasonal model?

# model_fit_3_arima_sarimax <- arima_reg(
#        seasonal_period = 32
#    ) %>%
#    set_engine("auto_arima") %>%
#   fit(total_drawl ~ timestamp 
#       + sunday
#       + saturday, 
#       data = training(splits))

#write_rds(model_fit_3_arima_sarimax, "data/model_fit_3_arima_sarimax.rds")

# Checkpoint data
model_fit_3_arima_sarimax <- read_rds("data/model_fit_3_arima_sarimax.rds")


model_fit_3_arima_sarimax
## parsnip model object
## 
## Fit time:  10m 25.7s 
## 
## Call:
## forecast::auto.arima(y = outcome, max.p = max.p, max.q = max.q, max.P = max.P, 
##     max.Q = max.Q, max.d = max.d, max.D = max.D, xreg = xreg_matrix, x = structure(list(
##         x = structure(c(18630.18, 19413.84, 19426.54, 19459.81, 19114.68, 18813, 
##         18581.31, 18381.33, 18285.86, 18781.02, 19000.5, 18896.72, 18686.42, 
##         18843.18, 18843.71, 18857.42, 18704.38, 18767.91, 18641.87, 18954.08, 
##         19277.41, 19946.77, 20499.77, 21056.07, 20897.11, 21190.8, 20924.82, 
##         20495.24, 20024.03, 19804.71, 19961.11, 19787.25, 19371.37, 19625.5, 
##         19839.44, 19758.76, 19809.16, 20260.54, 20197.41, 20217.21, 20271.12, 
##         20134.95, 20072.87, 19895.45, 19951.84, 19935.35, 19800.44, 19726.35, 
##         19589.14, 19815.66, 19670.6, 19474.16, 19658.92, 20177.11, 20434.8, 
##         20765.43, 20992.74, 21291.26, 21326.11, 21026.15, 20927.02, 21043.5, 
##         20898.71, 20508.45, 19996.91, 20274.58, 20235.29, 20331.02, 20340.24, 
##         19888.86, 18887.01, 18126.21, 17602.79, 17303.62, 17424.43, 17659.13, 
##         17750.03, 17849.92, 18015.21, 17330.85, 16901.02, 16991.04, 16853.98, 
##         16917.47, 16827.37, 17030.69, 17377.28, 17510.42, 17920.41, 18756.1, 
##         19075.72, 19419.34, 19628.63, 19457.91, 19587.23, 19405.64, 19089.07, 
##         19085.95, 18926.14, 18768.63, 18502.45, 18150.08, 18085.68, 18044.42, 
##         17998.97, 18166.02, 18145.24, 18039.86, 17903.03, 17942.95, 17814.23, 
##         17494.08, 17329.08, 17267.96, 17263.92, 17707.87, 18108.23, 18747.38, 
##         18991.27, 19095.52, 19260.19, 19575.33, 19905.32, 19997.56, 20289.26, 
##         20619.73, 20793.44, 20588.98, 20340.94, 20307.83, 20083.46, 19807.48, 
##         19511.13, 19510.72, 19746.2, 19682.35, 19611.43, 19566.57, 19447.49, 
##         19557.6, 19869.43, 20352.44, 20289.78, 19756.42, 19468.66, 19485.51, 
##         19423.66, 19618.38, 19499.95, 19436.88, 19555.23, 19540.65, 19584.54, 
##         19717.32, 19687.83, 19724.02, 20198.26, 20335.78, 20471.07, 20591.88, 
##         20340.48, 20423.76, 20188.24, 19800.17, 19690.68, 19386.21, 18785.88, 
##         18394.91, 17891.17, 17913.29, 17933.87, 18210.53, 18141.86, 18283.66, 
##         18267.8, 17840.17, 17745.49, 17837.81, 17845.65, 17725.95, 17501.98, 
##         17578.68, 17853.41, 17940.6, 18428.95, 19397.14, 19940.53, 20291.19, 
##         20335.88, 20366.37, 20535.15, 20338.7, 20109.53, 20300.55, 20117.82, 
##         20179.27, 19793.93, 19261.93, 18928.22, 18433.93, 18316.72, 18517.68, 
##         18408.52, 18407.69, 18090.38, 18019.1, 18311.26, 18371.38, 18156.74, 
##         17998.37, 17970.99, 18211.16, 18689.45, 19066.02, 19698.7, 20142.68, 
##         20312.23, 20758.96, 20646.02, 20677.4, 20461.3, 20992.29, 21126.28, 
##         20987.85, 20586.68, 20572.69, 20592.85, 20704.2, 20361.23, 20490.23, 
##         20423.11, 20507.98, 20934.44, 20936.96, 20746.02, 20853.96, 20890.07, 
##         21134.99, 21044.94, 20947.61, 20523.65, 20721.78, 20513.64, 19956.94, 
##         19885.48, 20096.73, 20036.83, 20289.97, 20240.84, 20466.32, 20498.95, 
##         20390.35, 20492.63, 20557.56, 20349.44, 20045.69, 19762.4, 19683.9, 
##         19640.33, 19520.49, 19240.29, 19323.99, 18910.44, 18608.13, 17697.94, 
##         17424.44, 17113.64, 16993.23, 17009.99, 17370.17, 17601.58, 17184.55, 
##         16663.2, 16853.18, 17155.55, 17091.81, 16834.61, 16994.49, 17315.83, 
##         17621.01, 18052.28, 18760.35, 18969.62, 19065.28, 19233.48, 19410.91, 
##         19287.53, 19015.38, 18689.59, 18604.76, 18967.54, 19151.2, 19096.54, 
##         18914.98, 18342.5, 18245.27, 18086.36, 17990.72, 18048.56, 17894.52, 
##         17897.01, 17836.71, 18039.06, 17930.37, 17918.51, 18117.04, 17983.83, 
##         18008.32, 17933.19, 18204.26, 18860.11, 19545.99, 19495.14, 19594.3, 
##         19210.8, 19159.85, 19116.15, 19591.85, 19567.97, 19394.06, 19121.62, 
##         19177.13, 19048.26, 18618.13, 18625.01, 18942.12, 18679.16, 18727.06, 
##         19005.48, 19463.03, 19590.07, 19632.56, 19944.68, 20366.4, 20348.23, 
##         20267.14, 19558.4, 19653.89, 19521.61, 19380.4, 19248.26, 19676.34, 
##         20117.65, 20464.73, 20664.82, 21190.91, 21561.84, 21559.87, 21679.57, 
##         21510.02, 21380.83, 21004.99, 21208.2, 21602.34, 21435.45, 21270.19, 
##         20906.93, 20820.44, 20434.32, 19806.86, 19099.66, 19082.37, 18989.71, 
##         18945.21, 18535.23, 18782.33, 18630.07, 18188.94, 17541.53, 17457.61, 
##         17529.59, 17895.88, 17669.69, 17671.25, 17847.67, 17954.02, 18294.62, 
##         18683.68, 18874.09, 19118.09, 19200.65, 19544.81, 19540.5, 19463.49, 
##         19634.46, 19891.96, 20111.41, 20407.46, 20345.55, 20137.95, 19960.06, 
##         19588.85, 19261.22, 19347.86, 19235.48, 19180.98, 18914.8, 18965.39, 
##         18996.52, 18767.93, 18366.02, 18316.36, 18439.48, 18751.1, 19126.76, 
##         19978.83, 20579.89, 20761.51, 20662.34, 20831.1, 20809.8, 20881.06, 
##         21262.65, 21165.37, 20803.9, 20288.77, 19682.27, 19649.9, 19799.58, 
##         19613.27, 19695.65, 19993.3, 20107.16, 20040.55, 20322.09, 20278.71, 
##         20040.93, 20280.17, 20550.89, 20701.71, 20655.85, 20171.8, 19938.12, 
##         20358.01, 20235.65, 20100.55, 19885.45, 19934.13, 20245.77, 20403.95, 
##         20430.03, 20994.41, 21335.82, 21251.42, 21428.96, 21382.72, 21452.34, 
##         21472.21, 21314.41, 21333.48, 21250.01, 21107.57, 20884.01, 20475.34, 
##         20084.77, 19455.52, 18804.79, 18610.75, 18484.35, 18639.54, 18737.2, 
##         18541.06, 17985.02, 17734.94, 17324.48, 17273.48, 17463.84, 17739.96, 
##         18004.02, 17803.81, 18260.02, 18228.66, 18574.1, 19341.29, 19811.31, 
##         20024.17, 20096.93, 20293.76, 20294.97, 20245.98, 20225.51, 20430.69, 
##         20653.41, 20513.57, 20212.71, 20056.14, 19767.46, 19632.27, 19256.4, 
##         19166.25, 19019.54, 18893.08, 18865.51, 18977.26, 19207.24, 19032.95, 
##         18909.97, 18915.58, 18877.86, 18920.22, 19016.18, 19814.69, 20812.94, 
##         21395.14, 21626.65, 22068.93, 22237.74, 22087.07, 22196.72, 22315.8, 
##         21820.37, 21434.93, 20780.78, 20814.79, 20795.83, 20796.33, 20635.01, 
##         20498.8, 20480.65, 20275.43, 20277.09, 20162.72, 20305.12, 20546.88, 
##         20763.71, 21120.08, 21284.3, 21345.85, 20952.54, 21218.29, 21200.6, 
##         21109.88, 20733.88, 20621.86, 21029.17, 21273.15, 20993.9, 21207.77, 
##         21345, 21752.83, 22247.54, 22342.62, 22037.99, 21630.73, 21204.21, 21462.13, 
##         21125.82, 20834.85, 20378.12, 19848.75, 19442.75, 19140.5, 18635.84, 
##         18342.7, 18252.7, 18259.47, 18582.49, 19016.84, 19173, 18816.79, 17594.79, 
##         17129.87, 17045.35, 17497.64, 17772.63, 17536.93, 17712.77, 18114.67, 
##         18816.32, 19461.63, 20045.89, 20005.81, 20272.23, 20350.28, 20262.97, 
##         20331.99, 20419.92, 20341.29, 20281.36, 20396.78, 20441.3, 20428.6, 
##         20141.29, 19803.1, 19649.49, 19435.69, 19266.19, 19299.79, 19177.02, 
##         19290.19, 19522.13, 19344.4, 19043.73, 19145.07, 19255.74, 19437.7, 
##         19680.98, 20294.35, 21060.76, 21777, 21613.16, 21884.45, 22066.45, 22169.23, 
##         22323.45, 22467.31, 22281.33, 21929.66, 21305.68, 21103.63, 21033.99, 
##         21123.05, 21162.89, 21403.24, 21426.92, 21266.2, 21284.99, 21413.89, 
##         21338.99, 21133.42, 21160.21, 21396.39, 21235.43, 21045.26, 20660.22, 
##         20677.37, 21053.88, 21056.12, 21120.18, 21108.66, 21440.25, 21882.2, 
##         22060.49, 22304.65, 22427.1, 22263.81, 22038.63, 21876.76, 21690.65, 
##         21613.77, 21693.36, 21582.78, 21324.48, 20776.32, 20629.68, 20459.98, 
##         20155.65, 19602.47, 19120.08, 19323.42, 19299.14, 19167.36, 18509.92, 
##         18351.01, 18295.51, 17908.21, 17711.97, 18028, 17734.15, 17406.95, 17310.11, 
##         17500.85, 17586.91, 17995.36, 18322.07, 19318.48, 19828.01, 19761.72, 
##         19375.35, 19266.93, 19130.03, 19125.35, 19208.75, 19370.79, 19286.56, 
##         19304.03, 18990.36, 19014.41, 19054.6, 18811.5, 18388.43, 18547.89, 
##         18193.3, 18448.38, 18410.84, 18395.29, 18354.53, 18174.42, 18117.74, 
##         18107.74, 18162.31, 18466.35, 19002.85, 19744.83, 20533.39, 20872.45, 
##         20530.31, 20818.92, 21127.23, 20788.8, 20726.55, 21257.48, 21225.27, 
##         21091.87, 20707.83, 20902.64, 20850.57, 20792.02, 20532.79, 20581.34, 
##         20612.43, 20517.63, 20640.57, 20822.89, 20797.54, 20646.56, 20998.91, 
##         21013, 21004.2, 20903.21, 20523.36, 21017.97, 21152.79, 21074.04, 20948.19, 
##         21264.15, 21750.16, 21698.25, 21804.47, 22058.22, 22281.55, 22684.43, 
##         22950.62, 22911.54, 22693.68, 22474.03, 22325.58, 21863.09, 21265.51, 
##         20512.7, 20430.1, 20614.61, 20490.3, 19900.14, 19178.91, 18785.39, 18503.18, 
##         17758.75, 17585.82, 17749.7, 17459.01, 17420.75, 17228.89, 17258.61, 
##         17351.19, 17287.57, 17136.78, 17183.31, 17072.03, 16957.77, 17399.89, 
##         17806.73, 18137.5, 18381.05, 18517.4, 18764.39, 19041.86, 19072.2, 19308.04, 
##         19505.48, 19782.33, 19913.18, 19839.52, 19596.05, 19196.69, 18878.25, 
##         18303.21, 18373.05, 18033.39, 17973.32, 17945.03, 18128.2, 18161.8, 
##         18058.86, 18087.03, 18050.17, 18279.59, 18557.34, 18789.62, 19445.64, 
##         20080.44, 20199.33, 20513.59, 20906.9, 20880.92, 20791.92, 21030.89, 
##         20879.83, 20877.02, 20532.57, 20075.14, 19950.6, 19848.27, 19317.14, 
##         19208.8, 19395.56, 19479.62, 19364.27, 19418.61, 19580.72, 19341.99, 
##         19335.19, 19498.19, 19625.96, 19569.96, 19394.94, 19027.42, 19213.92, 
##         19313.19, 19171.87, 19150.43, 19527.5, 19614.42, 19266.1, 18776.68, 
##         19105.28, 19517.74, 19693.56, 19882.25, 19604.68, 19251.02, 19515.26, 
##         19018.56, 18618.65, 18324.94, 17765.29, 17363.41, 17149.94, 16634.81, 
##         16407.28, 16039.38, 16066.24, 16267.08, 16044.27, 15551.65, 15736, 15603, 
##         15105.91, 14802.35, 14937.88, 15243.14, 15562.86, 15652.61, 16341.93, 
##         17001.05, 17130.2, 17720.89, 18382.82, 18890.81, 18976.11, 19186.95, 
##         19397.61, 19544.16, 19330.16, 18958.97, 18948.88, 18627.14, 18394.43, 
##         18281.51, 17857.44, 17356.84, 17118.56, 16691.2, 16903.74, 16827.93, 
##         16891.11, 17088.99, 17117.65, 17243.66, 17381.92, 17433.35, 17425.11, 
##         17580.74, 17649.98, 18106.17, 18797.46, 19287.16, 19852.61, 20147.62, 
##         20616.3, 20801.14, 20821.32, 20738.34, 20915.33, 20784.44, 20513.2, 
##         19820.19, 19619.18, 19773.57, 19702.06, 19886.23, 20057.08, 20109.22, 
##         19932.03, 20142.15, 20264.16, 20197.58, 20180.9, 20159.69, 20136.73, 
##         20237.59, 20340.95, 20008.92, 19916.12, 19542.68, 19630.16, 19598.46, 
##         19834.13, 20050.25, 20513, 20799.68, 21041.81, 21105.98, 21236.67, 21664.95, 
##         21633.21, 21388.58, 21055.39, 21145.91, 20933.46, 20818.9, 20545.79, 
##         20169.54, 19806.16, 19669.24, 18883.46, 18075.6, 17759.96, 17446.09, 
##         17527.16, 17620.79, 17872.58, 17964.88, 17598.45, 17087.38, 17249.57, 
##         17271.81, 17034.15, 16738.57, 16820.74, 16898.98, 17117.44, 17362.29, 
##         17886.25, 18450.2, 18675.57, 18747.91, 19043.29, 18986.57, 18954.3, 
##         19019.42, 19230.03, 19364.98, 19194.3, 18925.75, 18463.06, 17914.67, 
##         17812.96, 17652.76, 17666.85, 17673.79, 17760.28, 17763.29, 17821.41, 
##         17804.82, 17567.18, 17479.95, 17003.29, 16905.85, 17196.14, 17653.05, 
##         18496.76, 19050.72, 19143.54, 19217.55, 19187.17, 18926.94, 18753.65, 
##         18727.34, 18906.9, 18666.96, 18295.71, 18085.76, 17709.98, 17806.29, 
##         17922.68, 17928.18, 18035.08, 17927.68, 18083.37, 18319.35, 18558.25, 
##         18537.78, 18439.23, 18684.57, 18816.35, 18878.1, 18666.98, 18361.42, 
##         18542.74, 18624.95, 18781.42, 18807.87, 18890.71, 19163.6, 19419.33, 
##         19600.79, 19737.07, 19681.26, 19770.07, 19800.04, 19979.96, 19993.63, 
##         20327.72, 20182.21, 20007, 19567.01, 19178.55, 18784.29, 18295.01, 18001.49, 
##         17476.35, 16914.59, 16863.46, 16844.49, 16977.09, 16973.01, 17712.28, 
##         17749.02, 17567.01, 17266.99, 17263.29, 17321.13, 17445.61, 17165.5, 
##         17006.13, 17306.75, 17443.99, 17874.12, 18477.84, 18666.08, 19310.51, 
##         19244.58, 19370.26, 19403.61, 19463.24, 19332.01, 19163.15, 18972.86, 
##         18961.17, 18811.22, 18813.76, 18539.17, 18277.2, 18183.77, 17896.46, 
##         17922.81, 17997.34, 17829.31, 17502.18, 17602.35, 17832.07, 17795.01, 
##         17654.65, 17641.02, 17993.61, 18296.86, 19150.36, 19914.15, 20073.45, 
##         20063.87, 20616.01, 20575.55, 20302.84, 20354.71, 20023.36, 19690.01, 
##         19307.52, 18883.51, 18888.03, 18791.14, 18752.92, 18644.34, 18747.02, 
##         18809.71, 18883.63, 18920.17, 18845.69, 18733.66, 18675.8, 18898.81, 
##         19098.73, 18845.59, 18410.69, 18100.99, 18368.83, 18399.69, 18177.77, 
##         17997.51, 18362.46, 18195.05, 18305.85, 18548.78, 18809.67, 18972.51, 
##         19043.18, 19392.12, 19340.58, 19438.06, 19482.18, 19038.22, 19217.61, 
##         19259.14, 19337.27, 19087.84, 18842.02, 18566.95, 18181.34, 17551.75, 
##         17263.05, 16987.02, 16533.42, 16309.62, 16273.74, 16055.68, 15817.1, 
##         15365.3, 15282.72, 15363.84, 15523.49, 15790.71, 16015.42, 16155.1, 
##         16107.71, 16387.44, 17085.74, 18057.96, 18110.47, 17967.82, 18008.27, 
##         18175.52, 18240.45, 18130.14, 18056.43, 17854.74, 17919.87, 17659.63, 
##         17593.16, 17709.22, 17378.19, 17316.82, 17734.79, 17680.44, 17828.37, 
##         17877.92, 18098.46, 17997.57, 18115.75, 18144.01, 18271.61, 18289.96, 
##         18367.97, 18685.36, 19206.57, 19874.22, 20127.44, 19911.69, 19991.6, 
##         20091.38, 20044.37, 20185.75, 20203.01, 20200.19, 19932.23, 19248.65, 
##         19109.52, 19382.41, 19589.46, 19519.78, 19407.96, 19586.05, 19770.81, 
##         19846.56, 20135.43, 19986.55, 20066.33, 20055.2, 19791.13, 19337.98, 
##         19192.69, 18961.38, 19079.64, 18869.13, 18787.27, 18502.43, 18819.03, 
##         19078.87, 18902.73, 19278.33, 20024.49, 20537.32, 20713.02, 20457.22, 
##         20680.02, 20423.13, 20730.24, 20797.65, 20623.91, 20672.75, 20635.41, 
##         20158.43, 19740.51, 19111.09, 18367.17, 17588.84, 17540.3, 17876.53, 
##         17744.7, 17512.82, 17639.1, 17717.38, 17456.33, 16796.49, 16898.61, 
##         17097.05, 17156.48, 17431.95, 17782.27, 17965.98, 18297.3, 19016.84, 
##         19579.91, 19897.78, 20413.77, 20552.26, 20765.31, 20799.25, 20635.05, 
##         20537.78, 20342.45, 20052.3, 20116.93, 20053.63, 20206.91, 20659.7, 
##         20751.32, 20001.85, 19751.34, 19473.15, 19408.7, 19415.63, 19112.03, 
##         19263.57, 19583.46, 19638.61, 19833.6, 19813.78, 20329.83, 21037.08, 
##         22006.71, 22743.02, 23120.69, 23218.13, 23563.94, 23850.38, 23564.33, 
##         23333.43, 23258.14, 23188.52, 22752.37, 22234, 22200.07, 21606.76, 21524.39, 
##         22544.11, 22778.58, 23036.45, 22994.39, 23225.2, 23407.97, 23111.8, 
##         22574.37, 22200.1, 22265, 21872.38, 21353.68, 20901.71, 21214.73, 20983.53, 
##         20765.46, 20399.07, 20599.21, 20598.17, 20919.27, 21215.52, 21404.68, 
##         21621.41, 21864.5, 22022.52, 22170.16, 22203.17, 22320.02, 22008.86, 
##         22023.1, 21624.28, 21298.19, 21233, 21063.1, 20703.16, 20179.69, 19260.51, 
##         18694.31, 18402.34, 18235.31, 18120.38, 18408, 18256.73, 18270.24, 17914.87, 
##         17983.75, 17790.06, 17832.22, 18203.01, 18437.91, 18615.56, 18866.54, 
##         19253.58, 19957.7, 20249.09, 20454.54, 20515.55, 21009.49, 21160.59, 
##         20995.35, 20880.6, 21083.25, 21118.04, 21165.88, 20967.06, 20643.26, 
##         20500.54, 20289.48, 19993.39, 19910.46, 19672.47, 19630.13, 19741.18, 
##         19681.6, 19492.28, 19405.23, 19811.94, 19722.29, 19600.44, 19992.36, 
##         20387.63, 21459.46, 21914.19, 22369.02, 22487.49, 22823.51, 22920.89, 
##         22644.14, 22288.52, 22224.27, 21917.24, 21514.09, 20988.66, 21122.93, 
##         21141.07, 20959.85, 20987.55, 21148.64, 21328.04, 21226.66, 21297.04, 
##         21490.31, 21616.48, 21859.77, 22104.05, 22461.02, 22546.69, 22050.95, 
##         21526.6, 21701.56, 21547.57, 21360.91, 21233.99, 21183.48, 21166.6, 
##         21366.33, 21842.21, 22057.98, 22499.99, 23145.54, 23493.79, 23571.06, 
##         23678.93, 23459.22, 23430.69, 23374.62, 23134.81, 22642, 22285.55, 21789.74, 
##         21229.43, 20878.85, 20220.03, 20293.97, 20178.37, 19882.4, 19762.67, 
##         19677.69, 19544.52, 19064.67, 18250.31, 18307.4, 18392.82, 18233.73, 
##         18376.06, 18729.36, 19036.83, 19339.01, 19814.39, 20290.66, 20465.2, 
##         20403.9, 20802.1, 20744.79, 20698.11, 20590.67, 20324.31, 20767.19, 
##         20929.22, 20736.49, 20615.65, 20401.28, 19870.34, 19479.26, 18707.66, 
##         18502.52, 18270.13, 18287.08, 18112.23, 17980.91, 17872.28, 17731.12, 
##         17561.68, 17496.12, 17677.09, 18070.12, 18749.45, 19161.59, 19219.57, 
##         19474.42, 19424.65, 19574.18, 19286.96, 18968.33, 19002.38, 19032.34, 
##         19059.37, 19111.29, 18796.55, 18829.35, 18344.45, 18016.76, 17936.5, 
##         17853.9, 18175.65, 18589.65, 18650.37, 18684.45, 18688, 18427.17, 18597.56, 
##         18574.65, 18362.37, 18250.84, 17901.32, 17722.78, 17529.95, 17628.84, 
##         17654.74, 17640.96, 17747.36, 17819.81, 17698.79, 17323.82, 17221.57, 
##         17720.49, 17750.43, 17470.13, 17253.81, 17086.22, 17314.21, 16730.86, 
##         15946.06, 15339.73, 14824.91, 14722.66, 14311.28, 14185.39, 14056.04, 
##         14227.64, 13957.79, 13756.96, 13707.89, 13744.82, 13801.14, 13369.54, 
##         13617.03, 13592.06, 13352.54, 13677.48, 13637.83, 13820.22, 13605.06, 
##         13540.25, 13900.22, 14579.97, 14867.78, 15052.04, 15330.75, 15559.16, 
##         15491.72, 15431.59, 15211.1, 15107.64, 15115.29, 14997.65, 14806.37, 
##         14683.38, 14773.58, 14609.81, 14364.36, 14375.7, 14411.71, 14248.86, 
##         14146.39, 13967.17, 13824.95, 14265.51, 14125.92, 14013.75, 13824.1, 
##         13870.62, 13900.4, 14190.36, 14588.3, 14709.27, 14762.76, 14943.17, 
##         14939.74, 14939.37, 14896.18, 14632.29, 14441.63, 14493.98, 14045.45, 
##         14290.97, 14179.12, 13833.47, 13820.27, 13541.26, 13177.71, 13153.86, 
##         13448.59, 13456.01, 13499.59, 13671.62, 13297.99, 13289.16, 13298.42, 
##         13082.67, 12841.25, 12737.3, 12579.18, 12499.5, 12228.38, 12584.6, 12585.01, 
##         12826.35, 13270.41, 13609.71, 13870.63, 13987.58, 13974.83, 13610.81, 
##         12942.9, 12807.32, 12994.82, 13043.42, 12935.38, 12656.04, 12699.06, 
##         12814.45, 12611.6, 12379.99, 11944.14, 11893.42, 11941.85, 12474.2, 
##         12477.41, 13064.92, 12944.95, 12381.72, 12116.44, 12076.94, 12025.01, 
##         12045.14, 12170.61, 12188.64, 12551, 12506.17, 12767.66, 13133.46, 13095.83, 
##         13196.68, 13220.06, 13293.04, 13529.41, 13367.19, 13080.15, 13283.11, 
##         13011.9, 13010.93, 13266.66, 13270.75, 12950.41, 12795.41, 12620, 12689.02, 
##         12544.58, 12358.02, 12127.7, 12187.37, 12225.27, 12210.94, 12053.35, 
##         12087.73, 12437.37, 12589.93, 12682.8, 13006.65, 13400.51, 13676.59, 
##         13735.66, 13718.91, 13591.7, 13342.74, 13462.97, 13708.61, 13621.41, 
##         13700.07, 13700.27, 13745.89, 13630.08, 13780.62, 13936.12, 14087.8, 
##         13769.93, 13427.26, 13208.37, 13075.96, 13175.21, 13147.29, 13026.48, 
##         12962.82, 12570.63, 12154.06, 11704.82, 11695.93, 11754.36, 11526.4, 
##         11683.72, 12037.77, 12407.73, 12584.65, 12369.33, 12142.4, 12206.18, 
##         12421.23, 12260.82, 12375.77, 12439.38, 12448.46, 12307.76, 12128.61, 
##         12213.02, 12339.53, 12151.6, 12037.83, 12041.64, 11951.36, 11633.04, 
##         11673.6, 11840.46, 11731.43, 11918.39, 12202.55, 12014.09, 11798.28, 
##         11841.64, 11886.77, 11838.26, 12048.62, 12105.2, 12393.83, 12800.83, 
##         12792.07, 12659.74, 13210.27, 13410.58, 13251.07, 13264.94, 13184.83, 
##         13405.12, 13179.39, 13105.8, 12939.77, 13030.96, 13083.19, 12859.83, 
##         12794.06, 12785.62, 12579.34, 12420.69, 12347.31, 12286.45, 12210.18, 
##         12134.48, 11894.45, 11877.87, 11737.96, 11968.3, 11859.73, 12072.07, 
##         12268.64, 12460.24, 12924.85, 13398.04, 13848.04, 13876.49, 14137.35, 
##         13944.04, 13800.57, 13911.44, 14227.73, 14364.34, 14288.35, 13837.42, 
##         13929.16, 13729.32, 13634.34, 13593.98, 13701.75, 13561.31, 13681.57, 
##         13760.61, 13801.05, 13594.76, 13559.76, 13551.56, 13629.3, 13660.28, 
##         13550.02, 13553.12, 13807.47, 13920.48, 13591.92, 13478.51, 13517.68, 
##         13336.71, 13509.78, 13486.38, 13375.74, 13522.23, 13810.01, 13810.94, 
##         13368.52, 13274.03, 13672.04, 13811.24, 14290.35, 14758.53, 14932.49, 
##         14821.98, 14755.68, 15047.95, 15314.82, 15481.83, 15370.51, 15117.11, 
##         15143.79, 15358.93, 16218.67, 16524.81, 16302.59, 16240.01, 16057.47, 
##         16215.58, 15684.04, 15362.09, 15684.7, 16037.06, 16083.4, 16264.23, 
##         16737.16, 16868.49, 17158.9, 17248.46, 17307.52, 17171.64, 16858.6, 
##         16798.99, 16709.52, 16672.01, 16794.09, 16698.01, 16389.78, 16292.36, 
##         16086.02, 16125.61, 16143.33, 16132.47, 16131.34, 16051, 15915.95, 15819.17, 
##         15626.2, 15590.65, 15888.99, 15931.82, 16192.02, 16337.93, 16560.28, 
##         17100.17, 17503.99, 17523.13, 17654.56, 17674.76, 17630.04, 17522.87, 
##         17709.34, 17893.69, 17578.91, 17166.27, 17473.69, 17222.36, 17071.34, 
##         17083.82, 16975.88, 16927.01, 16876.2, 16836.43, 16924.96, 16780.87, 
##         16796.18, 16812.8, 16580, 16250.13, 16126.39, 15665.48, 15487.94, 15244.41, 
##         15138.84, 15026.17, 15200.17, 15366.02, 15626.36, 15920.51, 16046.36, 
##         15893.9, 15602.22, 15243.6, 15436.93, 15725, 15988.32, 16028.8, 16400.58, 
##         16795.54, 16656.68, 16575.75, 16568.1, 16465.75, 16495.77, 16213.31, 
##         16194, 16330.26, 16448.99, 16470.75, 16744.7, 16690.73, 16674.59, 16185.65, 
##         16519.62, 16582.25, 16270.86, 16330.01, 16703.77, 17208.72, 17382.25, 
##         17604.16, 18073.69, 18354, 18268.4, 18379.46, 18476.81, 18302.84, 18072.45, 
##         17961.8, 17969.11, 17949.82, 18041.99, 18171.52, 18115.33, 18048.32, 
##         17997.43, 17884.06, 17682.16, 17611.71, 17904.44, 17729.99, 17528.3, 
##         17414.43, 17273.74, 17230.89, 17008.69, 17018.58, 17329.97, 17654.21, 
##         18409.04, 18656.47, 19083.25, 19364.23, 19697.68, 19496.72, 18987.73, 
##         19039.47, 19102.83, 18852.04, 18428.39, 17966.28, 17982.32, 18092.84, 
##         17867.57, 17818.16, 17707.33, 17554.53, 17400.71, 17290.7, 17388.93, 
##         17295.87, 17356.03, 17319.39, 17208.8, 17058.18, 16751.02, 16400.09, 
##         16608.55, 16577.36, 16563.84, 16664.46, 16811.07, 17097.64, 17392.69, 
##         17429.06, 18089.14, 18175.47, 18364.04, 18789.63, 18765.58, 18687.04, 
##         18712.02, 18732.64, 18729.75, 18454.81, 18234.68, 18014.24, 17812.4, 
##         17646.61, 17080.83, 16816.78, 16900.06, 16776.34, 16668.19, 16668.06, 
##         16918.4, 17089.61, 16782.58, 16664.59, 16742.95, 16897.26, 17282.74, 
##         17496.15, 17729.9, 18230.92, 18446.35, 19079.35, 19904.79, 20226.41, 
##         20310.05, 20328.36, 20158.81, 20124.35, 19788.43, 19579.14, 19333.87, 
##         18894.66, 18666.55, 18552.66, 18616.58, 18352.52, 18230.94, 18233.09, 
##         17958.13, 17797.92, 17606.37, 17275.43, 17154.58, 17121.85, 17098.05, 
##         17020.47, 17030.54, 17288.31, 17568.81, 17909.05, 18178.97, 18916.62, 
##         19486.62, 19498.28, 19930.2, 20139.4, 20278.96, 20081.34, 20470.47, 
##         20137.33, 19666.6, 18966.84, 18835.83, 18777.27, 18569.62, 18601.45, 
##         18911.4, 19034.75, 19267.8, 19262.32, 19383.85, 19181.6, 19438.62, 19279.24, 
##         18998.75, 18935.77, 18705.78, 18297.5, 18675.37, 18913.24, 18976.5, 
##         18969.84, 19279.81, 19419.6, 19448.91, 20161.27, 20626, 20428.31, 20627.93, 
##         20572.48, 20872.43, 21039.58, 20833.91, 20475.44, 20558.47, 20391.82, 
##         20116.36, 19764.78, 19446.7, 19258.93, 18666.56, 18523.74, 18217.36, 
##         17922.19, 17598.1, 17361.53, 17661.38, 17894.33, 17360.44, 17524.17, 
##         17747.09, 17750.42, 17764.87, 17780.27, 17807.52, 18001.85, 18113.79, 
##         18318.77, 18921.44, 19614.43, 19521.68, 19463.55, 19562.41, 19370.2, 
##         19352.58, 19231.12, 18723.07, 18850.72, 18513.06, 18419.62, 18389.81, 
##         18088.28, 18103.83, 17811.26, 17845.89, 17809.72, 17564.78, 17314.17, 
##         17212.03, 17253.97, 17318.35, 17468.03, 17497.12, 17447.45, 17666.55, 
##         18260.74, 19004.77, 19637.03, 20194.89, 20454.46, 20762.48, 20725.54, 
##         20555.47, 20508.19, 20359.44, 20009.57, 19966.41, 20176.37, 20164.35, 
##         19821.72, 19678.38, 19734.53, 19589.58, 19783.81, 19666.71, 19872.05, 
##         19851.5, 19656.65, 19877.55, 19949.92, 20105.52, 20174.22, 20045.68, 
##         19937.6, 19819.2, 19761.81, 19497.85, 19484.8, 19628.33, 19893.4, 20125.15, 
##         20311.51, 20578.78, 20831.6, 21127.55, 21332.63, 21310, 21312.48, 21324.83, 
##         21007.82, 20789.23, 20757.35, 20387.78, 20357.15, 20148.91, 19774.01, 
##         19566.34, 19026.83, 18737.47, 18538.15, 18295.51, 18596.57, 19363.75, 
##         19547.24, 19408.55, 18994.41, 18781.34, 18930.02, 19043.16, 19187.53, 
##         19298, 19554.11, 19798.43, 20138.96, 20763.65, 20940.18, 21073.83, 21028.33, 
##         21132.61, 21114.34, 20624.53, 20120.62, 20270.23, 20053.86, 20056.94, 
##         19841.38, 19851.18, 19687, 19656.69, 19280.6, 19082.25, 18979.57, 18659.33, 
##         18474.96, 18371.59, 18382.99, 18403.87, 18397.41, 18123.28, 18247.73, 
##         18645.36, 19342.71, 19998.34, 20754.58, 21147.82, 21389.29, 21405.18, 
##         21423.69, 21620.88, 21931.36, 22024.51, 21876.16, 21562.62, 21049.54, 
##         20962.2, 20718.93, 20808.75, 20999.17, 21093.91, 20761.59, 20405.87, 
##         20483.19, 20523.87, 20563.39, 20783.21, 20779.78, 21009.84, 21078.86, 
##         21103.02, 20787.27, 20634.23, 20486.22, 20303.64, 20091.34, 20260.5, 
##         20680.43, 21126.42, 21284.19, 21762.84, 21790.86, 22087.47, 22306.71, 
##         22153.05, 22344.88, 22627.46, 22244.11, 22265.4, 22324.19, 22179.77, 
##         22105.64, 21623.26, 21259.31, 20853.51, 20284.94, 20330.65, 20279.34, 
##         19737.32, 19125.11, 18658.77, 18414.23, 18308.92, 18073.48, 18116.47, 
##         18346.22, 18397.54, 18596.03, 18880.58, 19182.36, 19236.84, 19511.2, 
##         20043.85, 20561.09, 20708.86, 20525.42, 20486.22, 20395.07, 20159.59, 
##         20005.33, 19859.91, 19673.67, 19768.41, 19370.51, 19072.01, 19045.46, 
##         18940.93, 18925.49, 18982.16, 19038.81, 19006.63, 18833.01, 18690.19, 
##         18615.7, 18761.24, 18394.55, 18399.24, 18450.19, 18405.73, 18809.31, 
##         19579.17, 20286.68, 20915.73, 21058.67, 21451.59, 21586.06, 21450.95, 
##         21625.84, 21564.58, 21407.21, 21240, 20988.5, 21124.37, 21246, 21238.47, 
##         21333.42, 21444.41, 21626.31, 21543.8, 21328.36, 21920.89, 21776.28, 
##         21453.53, 21248.45, 21234.92, 20779.94, 20441.35, 20112.94, 20027.34, 
##         20003.21, 20050.66, 20351.13, 20543.92, 20791.49, 20966.73, 21386.89, 
##         21944.4, 21923.87, 21877.92, 21788.72, 21903.04, 21985.6, 21739.45, 
##         21532.53, 21232.89, 21030.08, 20660.88, 20432.97, 20266.93, 19885.41, 
##         19034.93, 18391.03, 18361.81, 18202.56, 18090.49, 17863.64, 17871.93, 
##         17852.67, 17441.3, 17117.66, 17164.53, 17715.73, 18039.6, 17848.37, 
##         17916.65, 18220.08, 18775.2, 19112.11, 19521.56, 19813.27, 20044.3, 
##         19880.75, 20078.42, 19934.33, 19304.57, 19077.58, 19369.1, 19556.24, 
##         19327.47, 19360.6, 19504.08, 19505.15, 19324.39, 19217.47, 19294.98, 
##         19072.71, 19071.35, 18961.3, 18675.94, 18481.16, 18212.5, 18102.88, 
##         18296.44, 18578.93, 18802.12, 19157.47, 19947.69, 20532.27, 20610.35, 
##         20466.67, 20301.93, 20530.58, 20744.01, 20872.95, 20948.11, 20749.12, 
##         20553.35, 19508.39, 19122.49, 19023.48, 18818.18, 18670.52, 18929.57, 
##         18897.22, 18479.07, 18640.31, 18984.97, 18938.54, 18738.63, 18881.39, 
##         18898.86, 18886.33, 18682.42, 18315.78, 18432.9, 18251.18, 18124.82, 
##         18187.62, 18502.97, 18793.55, 19074.55, 19394.53, 20036.92, 20049.98, 
##         19996.69, 19920.82, 19537.94, 19628.1, 20229.72, 20542.1, 20848.13, 
##         21046.63, 20559.6, 19876.85, 19717.53, 19638.52, 19445.61, 18758.52, 
##         18556.07, 18596.54, 18815.4, 18685.41, 18739.94, 18769.21, 18229.85, 
##         18080.37, 18081.81, 18255.37, 18282.53, 18127.37, 18065.99, 18164.7, 
##         18894.06, 19295.05, 19786.17, 19885.92, 19683.89, 19746.75, 19941.33, 
##         20313.97, 19783.83, 19809.35, 19923.84, 19813.77, 19703.43, 19591.83, 
##         19602.65, 19307.75, 19201.47, 19166.7, 18970.5, 18770.52, 18816.42, 
##         18636.58, 18471.55, 18534.9, 18572.42, 18405.08, 18517.41, 18804.6, 
##         19123.54, 19619.18, 20306.09, 21330.14, 21722.75, 21644.69, 21647.55, 
##         21706.63, 21620.56, 21605.59, 21683.84, 21512.95, 21003.57, 20165.94, 
##         19896.1, 19568.24, 19305.24, 19262.77, 19160.89, 19211.09, 19624.03, 
##         19386.36, 19407.53, 19383.47, 19301.93, 19357.84, 19420.26, 19495.04, 
##         19568.23, 19516.96, 19834.69, 19972.81, 19854.82, 19757.22, 20193.67, 
##         20544.94, 20795.48, 21088.49, 21697.58, 22190.35, 22234.22, 22237.84, 
##         22201.78, 21912.72, 21738.63, 21148.62, 21396.79, 21386.69, 21350.88, 
##         21066.51, 21027.89, 20627.72, 20099.31, 19445.65, 19009.16, 18776.07, 
##         18890.31, 18652.58, 18541.16, 18526.26, 18604.27, 18748.38, 18960.71, 
##         18825.47, 18465.49, 18604.97, 19150.89, 19728.74, 19863.55, 20070.73, 
##         20827.37, 21203.05, 21465.16, 21618.05, 21567.66, 21872.74, 21695.97, 
##         21527.18, 21530.57, 21328.4, 21369.06, 21246.77, 20959.3, 20754.01, 
##         20451.52, 19935.47, 19575.83, 19385.43, 19431.28, 19565.13, 19454.52, 
##         19551.06, 19742.83, 19765.81, 19788.05, 19709.99, 19805.73, 19776.7, 
##         20471.98, 20957.92, 21141.48, 21661.96, 21854.95, 21859.64, 21925.44, 
##         21751.32, 21864.61, 21364.97, 20876.42, 20177.2, 20065.02, 20028.08, 
##         19765.67, 19681.23, 19578.05, 19543.02, 19605.95, 19841.96, 19923.71, 
##         19764.32, 19824.46, 20002.7, 20067.85, 20061.62, 20159.94, 19918.19, 
##         19945.12, 19803.34, 19765.08, 19773.59, 20116.17, 20961.53, 21663.58, 
##         21786.47, 22318.7, 22498.41, 22419.74, 22249.54, 22038.97, 22164.84, 
##         22029.55, 21678.52, 21665.57, 21477.29, 20994.46, 20655.38, 20606.22, 
##         20595.41, 20311.26, 19609.14, 19493.77, 19225.75, 18838.13, 18763.45, 
##         19065.89, 19195.47, 18737.52, 18609.5, 18533.16, 18508.24, 18518.65, 
##         18611.83, 18741.72, 18737.93, 18852.24, 18820.88, 19300.69, 19461.64, 
##         19654.11, 19833.11, 19833.17, 19769.29, 19584.56, 19287.81, 19109.45, 
##         19437.91, 19551.31, 19283.53, 19551.26, 19587.11, 19589.01, 19342.44, 
##         19264.82, 19223.3, 19109.72, 18999.64, 19065.79, 19330.64, 19419.46, 
##         19400.37, 19162, 19234.37, 19650.48, 19886.38, 20467.19, 21067.91, 21527.02, 
##         21833.07, 22191.25, 21953.5, 21767.54, 21736.98, 21915.2, 21510.33, 
##         21384.44, 21130.67, 21248.25, 21331.54, 21312.21, 21571.09, 21506.21, 
##         21160.85, 21184.41, 21024.21, 21410.04, 21564.92, 21298.16, 21409.08, 
##         21367.62, 21307.06, 21308.81, 20830.61, 20941.44, 21276.43, 21567.01, 
##         21408.52, 21852.98, 22086.9, 22120.56, 22096.66, 22241.28, 22017.82, 
##         22255.58, 22416.15, 22062.27, 22425.26, 21941.87, 21321.81, 21171.21, 
##         20899.4, 20536.46, 20288.23, 20197.35, 20207.06, 19737.24, 19162.1, 
##         19004.87, 18693.44, 18390.61, 18762.42, 18777.67, 18792.27, 18597.15, 
##         18334.29, 18335.22, 18194.67, 18109.13, 18095.2, 18175.7, 18302.6, 18266.69, 
##         18810.87, 19174.24, 19462.65, 20023.86, 20255.21, 20342.97, 20367.34, 
##         19974.67, 20174.67, 20426.53, 20096.86, 20010.51, 19934.76, 19915.75, 
##         19816.97, 19552.52, 19531.58, 19858.08, 19914.68, 20047.86, 20449.82, 
##         20560.55, 20506.62, 20535.67, 20497.38, 20532.19, 20356.57, 20352.97, 
##         20621.94, 21029.03, 21491.3, 21738.31, 21809.36, 21824.27, 21537.32, 
##         21443.5, 21652.65, 21879.16, 22145.25, 21770.55, 21144.26, 20756.37, 
##         20422.7, 20323.16, 20121.18, 20108.28, 20076.72, 19843.88, 19917.6, 
##         20082.26, 19859.19, 19912.95, 20099.07, 20353.88, 20529.86, 20384.88, 
##         20273.55, 20548.98, 20556.22, 20471.39, 20551.09, 20678.13, 20605.21, 
##         20313.03, 20426.6, 20657.63, 20959.17, 20965.95, 20947.37, 20633.84, 
##         20655.57, 20792.14, 20522.98, 20527.85, 20048.44, 19468.07, 19074.97, 
##         18643.19, 18348.27, 17895.93, 17410.99, 17035.03, 16728.06, 16298.17, 
##         16542.78, 17120.48, 17758.16, 17871.71, 17650.82, 17774.45, 18066.79, 
##         17762.07, 17323.28, 17413.73, 17740.54, 18438.32, 18960.57, 19393.91, 
##         19673.52, 19628.14, 19766.19, 19805.82, 19458.31, 18765.82), .Tsp = c(1, 
##         90.96875, 32), class = "ts")), class = "data.frame", row.names = c(NA, 
##     -2880L)))
## 
## Coefficients:
##          ar1     ar2      ar3     ma1     sar1    sunday  saturday
##       0.5878  0.6789  -0.3135  0.8334  -0.5043  217.9344   71.7301
## s.e.  0.0681  0.0989   0.0380  0.0634   0.0163   80.3210   80.5038
## 
## sigma^2 estimated as 71753:  log likelihood = -19965.73,  aic = 39947.47

Model 4 - Force Seasonality w/ Regular ARIMA

We can force seasonality using Regular (non-auto) ARIMA.

  • Start with arima_reg():
    • Set seasonal_period = 4 to force a 4-period (monthly) seasonality
    • Set your non seasonal arima parameters to (2,1,2)
    • Set your seasonal arima parameters to (1,0,1)
  • Set your engine to "arima"
  • Use the formula with events added.
  • Store your model as model_fit_4_arima_sarimax

Questions: - Is this a seasonal model? - Does adding the seasonality seem to improve the ARIMA model?

# model_fit_4_arima_sarimax <- arima_reg(
#         seasonal_period          = 32,
#         # Non-Seasonal Terms
#         non_seasonal_ar          = 2,
#         non_seasonal_differences = 1, 
#         non_seasonal_ma = 2, 
#         # Seasonal Terms
#         seasonal_ar = 1, 
#         seasonal_differences = 0, 
#         seasonal_ma = 1
#     ) %>%
#    fit(total_drawl ~ timestamp 
#         + sunday
#         + saturday, 
#         data = training(splits))

#write_rds(model_fit_4_arima_sarimax, "data/model_fit_4_arima_sarimax.rds")

# Checkpoint data
model_fit_4_arima_sarimax  <- read_rds("data/model_fit_4_arima_sarimax.rds")


model_fit_4_arima_sarimax
## parsnip model object
## 
## Fit time:  1m 51.1s 
## 
## Call:
## forecast::Arima(y = outcome, order = c(p, d, q), seasonal = c(P, D, Q), xreg = xreg_matrix, 
##     method = "ML")
## 
## Coefficients:
##           ar1     ar2     ma1      ma2    sar1     sma1    sunday  saturday
##       -0.2231  0.2521  0.6340  -0.0549  0.9998  -0.9879  145.3113   23.8348
## s.e.   0.1597  0.0474  0.1601   0.0612  0.0003   0.0079   78.6142   78.7419
## 
## sigma^2 estimated as 45975:  log likelihood = -19577.37,  aic = 39172.74

Model 5 - Use Fourier Terms + weekend Events instead of Seasonality

Last try to improve the Auto ARIMA model. Let’s add a fourier series at period = 4 to try to capture the strong ACF in Lag 4.

  • Start with arima_reg()
  • Pipe into set_engine() using “auto_arima”
  • Use a formula that includes events
  • Add to your forumla a fourier_vec() at period = 4.
  • Store your model as model_fit_5_arima_xreg_fourier
  • Print the model

Questions: - Does the added fourier term seem to improve the AIC of the model?

# model_fit_5_arima_xreg_fourier <- arima_reg() %>%
#     set_engine("auto_arima") %>%
#     fit(total_drawl ~ timestamp 
#         + fourier_vec(timestamp, period = 32)
#         + sunday
#         + saturday, 
#         data = training(splits))

#write_rds(model_fit_5_arima_xreg_fourier, "data/model_fit_5_arima_xreg_fourier.rds")

# Checkpoint data
model_fit_5_arima_xreg_fourier  <- read_rds("data/model_fit_5_arima_xreg_fourier.rds")

model_fit_5_arima_xreg_fourier
## parsnip model object
## 
## Fit time:  19m 6.1s 
## 
## Call:
## forecast::auto.arima(y = outcome, max.p = max.p, max.q = max.q, max.P = max.P, 
##     max.Q = max.Q, max.d = max.d, max.D = max.D, xreg = xreg_matrix, x = structure(list(
##         x = structure(c(18630.18, 19413.84, 19426.54, 19459.81, 19114.68, 18813, 
##         18581.31, 18381.33, 18285.86, 18781.02, 19000.5, 18896.72, 18686.42, 
##         18843.18, 18843.71, 18857.42, 18704.38, 18767.91, 18641.87, 18954.08, 
##         19277.41, 19946.77, 20499.77, 21056.07, 20897.11, 21190.8, 20924.82, 
##         20495.24, 20024.03, 19804.71, 19961.11, 19787.25, 19371.37, 19625.5, 
##         19839.44, 19758.76, 19809.16, 20260.54, 20197.41, 20217.21, 20271.12, 
##         20134.95, 20072.87, 19895.45, 19951.84, 19935.35, 19800.44, 19726.35, 
##         19589.14, 19815.66, 19670.6, 19474.16, 19658.92, 20177.11, 20434.8, 
##         20765.43, 20992.74, 21291.26, 21326.11, 21026.15, 20927.02, 21043.5, 
##         20898.71, 20508.45, 19996.91, 20274.58, 20235.29, 20331.02, 20340.24, 
##         19888.86, 18887.01, 18126.21, 17602.79, 17303.62, 17424.43, 17659.13, 
##         17750.03, 17849.92, 18015.21, 17330.85, 16901.02, 16991.04, 16853.98, 
##         16917.47, 16827.37, 17030.69, 17377.28, 17510.42, 17920.41, 18756.1, 
##         19075.72, 19419.34, 19628.63, 19457.91, 19587.23, 19405.64, 19089.07, 
##         19085.95, 18926.14, 18768.63, 18502.45, 18150.08, 18085.68, 18044.42, 
##         17998.97, 18166.02, 18145.24, 18039.86, 17903.03, 17942.95, 17814.23, 
##         17494.08, 17329.08, 17267.96, 17263.92, 17707.87, 18108.23, 18747.38, 
##         18991.27, 19095.52, 19260.19, 19575.33, 19905.32, 19997.56, 20289.26, 
##         20619.73, 20793.44, 20588.98, 20340.94, 20307.83, 20083.46, 19807.48, 
##         19511.13, 19510.72, 19746.2, 19682.35, 19611.43, 19566.57, 19447.49, 
##         19557.6, 19869.43, 20352.44, 20289.78, 19756.42, 19468.66, 19485.51, 
##         19423.66, 19618.38, 19499.95, 19436.88, 19555.23, 19540.65, 19584.54, 
##         19717.32, 19687.83, 19724.02, 20198.26, 20335.78, 20471.07, 20591.88, 
##         20340.48, 20423.76, 20188.24, 19800.17, 19690.68, 19386.21, 18785.88, 
##         18394.91, 17891.17, 17913.29, 17933.87, 18210.53, 18141.86, 18283.66, 
##         18267.8, 17840.17, 17745.49, 17837.81, 17845.65, 17725.95, 17501.98, 
##         17578.68, 17853.41, 17940.6, 18428.95, 19397.14, 19940.53, 20291.19, 
##         20335.88, 20366.37, 20535.15, 20338.7, 20109.53, 20300.55, 20117.82, 
##         20179.27, 19793.93, 19261.93, 18928.22, 18433.93, 18316.72, 18517.68, 
##         18408.52, 18407.69, 18090.38, 18019.1, 18311.26, 18371.38, 18156.74, 
##         17998.37, 17970.99, 18211.16, 18689.45, 19066.02, 19698.7, 20142.68, 
##         20312.23, 20758.96, 20646.02, 20677.4, 20461.3, 20992.29, 21126.28, 
##         20987.85, 20586.68, 20572.69, 20592.85, 20704.2, 20361.23, 20490.23, 
##         20423.11, 20507.98, 20934.44, 20936.96, 20746.02, 20853.96, 20890.07, 
##         21134.99, 21044.94, 20947.61, 20523.65, 20721.78, 20513.64, 19956.94, 
##         19885.48, 20096.73, 20036.83, 20289.97, 20240.84, 20466.32, 20498.95, 
##         20390.35, 20492.63, 20557.56, 20349.44, 20045.69, 19762.4, 19683.9, 
##         19640.33, 19520.49, 19240.29, 19323.99, 18910.44, 18608.13, 17697.94, 
##         17424.44, 17113.64, 16993.23, 17009.99, 17370.17, 17601.58, 17184.55, 
##         16663.2, 16853.18, 17155.55, 17091.81, 16834.61, 16994.49, 17315.83, 
##         17621.01, 18052.28, 18760.35, 18969.62, 19065.28, 19233.48, 19410.91, 
##         19287.53, 19015.38, 18689.59, 18604.76, 18967.54, 19151.2, 19096.54, 
##         18914.98, 18342.5, 18245.27, 18086.36, 17990.72, 18048.56, 17894.52, 
##         17897.01, 17836.71, 18039.06, 17930.37, 17918.51, 18117.04, 17983.83, 
##         18008.32, 17933.19, 18204.26, 18860.11, 19545.99, 19495.14, 19594.3, 
##         19210.8, 19159.85, 19116.15, 19591.85, 19567.97, 19394.06, 19121.62, 
##         19177.13, 19048.26, 18618.13, 18625.01, 18942.12, 18679.16, 18727.06, 
##         19005.48, 19463.03, 19590.07, 19632.56, 19944.68, 20366.4, 20348.23, 
##         20267.14, 19558.4, 19653.89, 19521.61, 19380.4, 19248.26, 19676.34, 
##         20117.65, 20464.73, 20664.82, 21190.91, 21561.84, 21559.87, 21679.57, 
##         21510.02, 21380.83, 21004.99, 21208.2, 21602.34, 21435.45, 21270.19, 
##         20906.93, 20820.44, 20434.32, 19806.86, 19099.66, 19082.37, 18989.71, 
##         18945.21, 18535.23, 18782.33, 18630.07, 18188.94, 17541.53, 17457.61, 
##         17529.59, 17895.88, 17669.69, 17671.25, 17847.67, 17954.02, 18294.62, 
##         18683.68, 18874.09, 19118.09, 19200.65, 19544.81, 19540.5, 19463.49, 
##         19634.46, 19891.96, 20111.41, 20407.46, 20345.55, 20137.95, 19960.06, 
##         19588.85, 19261.22, 19347.86, 19235.48, 19180.98, 18914.8, 18965.39, 
##         18996.52, 18767.93, 18366.02, 18316.36, 18439.48, 18751.1, 19126.76, 
##         19978.83, 20579.89, 20761.51, 20662.34, 20831.1, 20809.8, 20881.06, 
##         21262.65, 21165.37, 20803.9, 20288.77, 19682.27, 19649.9, 19799.58, 
##         19613.27, 19695.65, 19993.3, 20107.16, 20040.55, 20322.09, 20278.71, 
##         20040.93, 20280.17, 20550.89, 20701.71, 20655.85, 20171.8, 19938.12, 
##         20358.01, 20235.65, 20100.55, 19885.45, 19934.13, 20245.77, 20403.95, 
##         20430.03, 20994.41, 21335.82, 21251.42, 21428.96, 21382.72, 21452.34, 
##         21472.21, 21314.41, 21333.48, 21250.01, 21107.57, 20884.01, 20475.34, 
##         20084.77, 19455.52, 18804.79, 18610.75, 18484.35, 18639.54, 18737.2, 
##         18541.06, 17985.02, 17734.94, 17324.48, 17273.48, 17463.84, 17739.96, 
##         18004.02, 17803.81, 18260.02, 18228.66, 18574.1, 19341.29, 19811.31, 
##         20024.17, 20096.93, 20293.76, 20294.97, 20245.98, 20225.51, 20430.69, 
##         20653.41, 20513.57, 20212.71, 20056.14, 19767.46, 19632.27, 19256.4, 
##         19166.25, 19019.54, 18893.08, 18865.51, 18977.26, 19207.24, 19032.95, 
##         18909.97, 18915.58, 18877.86, 18920.22, 19016.18, 19814.69, 20812.94, 
##         21395.14, 21626.65, 22068.93, 22237.74, 22087.07, 22196.72, 22315.8, 
##         21820.37, 21434.93, 20780.78, 20814.79, 20795.83, 20796.33, 20635.01, 
##         20498.8, 20480.65, 20275.43, 20277.09, 20162.72, 20305.12, 20546.88, 
##         20763.71, 21120.08, 21284.3, 21345.85, 20952.54, 21218.29, 21200.6, 
##         21109.88, 20733.88, 20621.86, 21029.17, 21273.15, 20993.9, 21207.77, 
##         21345, 21752.83, 22247.54, 22342.62, 22037.99, 21630.73, 21204.21, 21462.13, 
##         21125.82, 20834.85, 20378.12, 19848.75, 19442.75, 19140.5, 18635.84, 
##         18342.7, 18252.7, 18259.47, 18582.49, 19016.84, 19173, 18816.79, 17594.79, 
##         17129.87, 17045.35, 17497.64, 17772.63, 17536.93, 17712.77, 18114.67, 
##         18816.32, 19461.63, 20045.89, 20005.81, 20272.23, 20350.28, 20262.97, 
##         20331.99, 20419.92, 20341.29, 20281.36, 20396.78, 20441.3, 20428.6, 
##         20141.29, 19803.1, 19649.49, 19435.69, 19266.19, 19299.79, 19177.02, 
##         19290.19, 19522.13, 19344.4, 19043.73, 19145.07, 19255.74, 19437.7, 
##         19680.98, 20294.35, 21060.76, 21777, 21613.16, 21884.45, 22066.45, 22169.23, 
##         22323.45, 22467.31, 22281.33, 21929.66, 21305.68, 21103.63, 21033.99, 
##         21123.05, 21162.89, 21403.24, 21426.92, 21266.2, 21284.99, 21413.89, 
##         21338.99, 21133.42, 21160.21, 21396.39, 21235.43, 21045.26, 20660.22, 
##         20677.37, 21053.88, 21056.12, 21120.18, 21108.66, 21440.25, 21882.2, 
##         22060.49, 22304.65, 22427.1, 22263.81, 22038.63, 21876.76, 21690.65, 
##         21613.77, 21693.36, 21582.78, 21324.48, 20776.32, 20629.68, 20459.98, 
##         20155.65, 19602.47, 19120.08, 19323.42, 19299.14, 19167.36, 18509.92, 
##         18351.01, 18295.51, 17908.21, 17711.97, 18028, 17734.15, 17406.95, 17310.11, 
##         17500.85, 17586.91, 17995.36, 18322.07, 19318.48, 19828.01, 19761.72, 
##         19375.35, 19266.93, 19130.03, 19125.35, 19208.75, 19370.79, 19286.56, 
##         19304.03, 18990.36, 19014.41, 19054.6, 18811.5, 18388.43, 18547.89, 
##         18193.3, 18448.38, 18410.84, 18395.29, 18354.53, 18174.42, 18117.74, 
##         18107.74, 18162.31, 18466.35, 19002.85, 19744.83, 20533.39, 20872.45, 
##         20530.31, 20818.92, 21127.23, 20788.8, 20726.55, 21257.48, 21225.27, 
##         21091.87, 20707.83, 20902.64, 20850.57, 20792.02, 20532.79, 20581.34, 
##         20612.43, 20517.63, 20640.57, 20822.89, 20797.54, 20646.56, 20998.91, 
##         21013, 21004.2, 20903.21, 20523.36, 21017.97, 21152.79, 21074.04, 20948.19, 
##         21264.15, 21750.16, 21698.25, 21804.47, 22058.22, 22281.55, 22684.43, 
##         22950.62, 22911.54, 22693.68, 22474.03, 22325.58, 21863.09, 21265.51, 
##         20512.7, 20430.1, 20614.61, 20490.3, 19900.14, 19178.91, 18785.39, 18503.18, 
##         17758.75, 17585.82, 17749.7, 17459.01, 17420.75, 17228.89, 17258.61, 
##         17351.19, 17287.57, 17136.78, 17183.31, 17072.03, 16957.77, 17399.89, 
##         17806.73, 18137.5, 18381.05, 18517.4, 18764.39, 19041.86, 19072.2, 19308.04, 
##         19505.48, 19782.33, 19913.18, 19839.52, 19596.05, 19196.69, 18878.25, 
##         18303.21, 18373.05, 18033.39, 17973.32, 17945.03, 18128.2, 18161.8, 
##         18058.86, 18087.03, 18050.17, 18279.59, 18557.34, 18789.62, 19445.64, 
##         20080.44, 20199.33, 20513.59, 20906.9, 20880.92, 20791.92, 21030.89, 
##         20879.83, 20877.02, 20532.57, 20075.14, 19950.6, 19848.27, 19317.14, 
##         19208.8, 19395.56, 19479.62, 19364.27, 19418.61, 19580.72, 19341.99, 
##         19335.19, 19498.19, 19625.96, 19569.96, 19394.94, 19027.42, 19213.92, 
##         19313.19, 19171.87, 19150.43, 19527.5, 19614.42, 19266.1, 18776.68, 
##         19105.28, 19517.74, 19693.56, 19882.25, 19604.68, 19251.02, 19515.26, 
##         19018.56, 18618.65, 18324.94, 17765.29, 17363.41, 17149.94, 16634.81, 
##         16407.28, 16039.38, 16066.24, 16267.08, 16044.27, 15551.65, 15736, 15603, 
##         15105.91, 14802.35, 14937.88, 15243.14, 15562.86, 15652.61, 16341.93, 
##         17001.05, 17130.2, 17720.89, 18382.82, 18890.81, 18976.11, 19186.95, 
##         19397.61, 19544.16, 19330.16, 18958.97, 18948.88, 18627.14, 18394.43, 
##         18281.51, 17857.44, 17356.84, 17118.56, 16691.2, 16903.74, 16827.93, 
##         16891.11, 17088.99, 17117.65, 17243.66, 17381.92, 17433.35, 17425.11, 
##         17580.74, 17649.98, 18106.17, 18797.46, 19287.16, 19852.61, 20147.62, 
##         20616.3, 20801.14, 20821.32, 20738.34, 20915.33, 20784.44, 20513.2, 
##         19820.19, 19619.18, 19773.57, 19702.06, 19886.23, 20057.08, 20109.22, 
##         19932.03, 20142.15, 20264.16, 20197.58, 20180.9, 20159.69, 20136.73, 
##         20237.59, 20340.95, 20008.92, 19916.12, 19542.68, 19630.16, 19598.46, 
##         19834.13, 20050.25, 20513, 20799.68, 21041.81, 21105.98, 21236.67, 21664.95, 
##         21633.21, 21388.58, 21055.39, 21145.91, 20933.46, 20818.9, 20545.79, 
##         20169.54, 19806.16, 19669.24, 18883.46, 18075.6, 17759.96, 17446.09, 
##         17527.16, 17620.79, 17872.58, 17964.88, 17598.45, 17087.38, 17249.57, 
##         17271.81, 17034.15, 16738.57, 16820.74, 16898.98, 17117.44, 17362.29, 
##         17886.25, 18450.2, 18675.57, 18747.91, 19043.29, 18986.57, 18954.3, 
##         19019.42, 19230.03, 19364.98, 19194.3, 18925.75, 18463.06, 17914.67, 
##         17812.96, 17652.76, 17666.85, 17673.79, 17760.28, 17763.29, 17821.41, 
##         17804.82, 17567.18, 17479.95, 17003.29, 16905.85, 17196.14, 17653.05, 
##         18496.76, 19050.72, 19143.54, 19217.55, 19187.17, 18926.94, 18753.65, 
##         18727.34, 18906.9, 18666.96, 18295.71, 18085.76, 17709.98, 17806.29, 
##         17922.68, 17928.18, 18035.08, 17927.68, 18083.37, 18319.35, 18558.25, 
##         18537.78, 18439.23, 18684.57, 18816.35, 18878.1, 18666.98, 18361.42, 
##         18542.74, 18624.95, 18781.42, 18807.87, 18890.71, 19163.6, 19419.33, 
##         19600.79, 19737.07, 19681.26, 19770.07, 19800.04, 19979.96, 19993.63, 
##         20327.72, 20182.21, 20007, 19567.01, 19178.55, 18784.29, 18295.01, 18001.49, 
##         17476.35, 16914.59, 16863.46, 16844.49, 16977.09, 16973.01, 17712.28, 
##         17749.02, 17567.01, 17266.99, 17263.29, 17321.13, 17445.61, 17165.5, 
##         17006.13, 17306.75, 17443.99, 17874.12, 18477.84, 18666.08, 19310.51, 
##         19244.58, 19370.26, 19403.61, 19463.24, 19332.01, 19163.15, 18972.86, 
##         18961.17, 18811.22, 18813.76, 18539.17, 18277.2, 18183.77, 17896.46, 
##         17922.81, 17997.34, 17829.31, 17502.18, 17602.35, 17832.07, 17795.01, 
##         17654.65, 17641.02, 17993.61, 18296.86, 19150.36, 19914.15, 20073.45, 
##         20063.87, 20616.01, 20575.55, 20302.84, 20354.71, 20023.36, 19690.01, 
##         19307.52, 18883.51, 18888.03, 18791.14, 18752.92, 18644.34, 18747.02, 
##         18809.71, 18883.63, 18920.17, 18845.69, 18733.66, 18675.8, 18898.81, 
##         19098.73, 18845.59, 18410.69, 18100.99, 18368.83, 18399.69, 18177.77, 
##         17997.51, 18362.46, 18195.05, 18305.85, 18548.78, 18809.67, 18972.51, 
##         19043.18, 19392.12, 19340.58, 19438.06, 19482.18, 19038.22, 19217.61, 
##         19259.14, 19337.27, 19087.84, 18842.02, 18566.95, 18181.34, 17551.75, 
##         17263.05, 16987.02, 16533.42, 16309.62, 16273.74, 16055.68, 15817.1, 
##         15365.3, 15282.72, 15363.84, 15523.49, 15790.71, 16015.42, 16155.1, 
##         16107.71, 16387.44, 17085.74, 18057.96, 18110.47, 17967.82, 18008.27, 
##         18175.52, 18240.45, 18130.14, 18056.43, 17854.74, 17919.87, 17659.63, 
##         17593.16, 17709.22, 17378.19, 17316.82, 17734.79, 17680.44, 17828.37, 
##         17877.92, 18098.46, 17997.57, 18115.75, 18144.01, 18271.61, 18289.96, 
##         18367.97, 18685.36, 19206.57, 19874.22, 20127.44, 19911.69, 19991.6, 
##         20091.38, 20044.37, 20185.75, 20203.01, 20200.19, 19932.23, 19248.65, 
##         19109.52, 19382.41, 19589.46, 19519.78, 19407.96, 19586.05, 19770.81, 
##         19846.56, 20135.43, 19986.55, 20066.33, 20055.2, 19791.13, 19337.98, 
##         19192.69, 18961.38, 19079.64, 18869.13, 18787.27, 18502.43, 18819.03, 
##         19078.87, 18902.73, 19278.33, 20024.49, 20537.32, 20713.02, 20457.22, 
##         20680.02, 20423.13, 20730.24, 20797.65, 20623.91, 20672.75, 20635.41, 
##         20158.43, 19740.51, 19111.09, 18367.17, 17588.84, 17540.3, 17876.53, 
##         17744.7, 17512.82, 17639.1, 17717.38, 17456.33, 16796.49, 16898.61, 
##         17097.05, 17156.48, 17431.95, 17782.27, 17965.98, 18297.3, 19016.84, 
##         19579.91, 19897.78, 20413.77, 20552.26, 20765.31, 20799.25, 20635.05, 
##         20537.78, 20342.45, 20052.3, 20116.93, 20053.63, 20206.91, 20659.7, 
##         20751.32, 20001.85, 19751.34, 19473.15, 19408.7, 19415.63, 19112.03, 
##         19263.57, 19583.46, 19638.61, 19833.6, 19813.78, 20329.83, 21037.08, 
##         22006.71, 22743.02, 23120.69, 23218.13, 23563.94, 23850.38, 23564.33, 
##         23333.43, 23258.14, 23188.52, 22752.37, 22234, 22200.07, 21606.76, 21524.39, 
##         22544.11, 22778.58, 23036.45, 22994.39, 23225.2, 23407.97, 23111.8, 
##         22574.37, 22200.1, 22265, 21872.38, 21353.68, 20901.71, 21214.73, 20983.53, 
##         20765.46, 20399.07, 20599.21, 20598.17, 20919.27, 21215.52, 21404.68, 
##         21621.41, 21864.5, 22022.52, 22170.16, 22203.17, 22320.02, 22008.86, 
##         22023.1, 21624.28, 21298.19, 21233, 21063.1, 20703.16, 20179.69, 19260.51, 
##         18694.31, 18402.34, 18235.31, 18120.38, 18408, 18256.73, 18270.24, 17914.87, 
##         17983.75, 17790.06, 17832.22, 18203.01, 18437.91, 18615.56, 18866.54, 
##         19253.58, 19957.7, 20249.09, 20454.54, 20515.55, 21009.49, 21160.59, 
##         20995.35, 20880.6, 21083.25, 21118.04, 21165.88, 20967.06, 20643.26, 
##         20500.54, 20289.48, 19993.39, 19910.46, 19672.47, 19630.13, 19741.18, 
##         19681.6, 19492.28, 19405.23, 19811.94, 19722.29, 19600.44, 19992.36, 
##         20387.63, 21459.46, 21914.19, 22369.02, 22487.49, 22823.51, 22920.89, 
##         22644.14, 22288.52, 22224.27, 21917.24, 21514.09, 20988.66, 21122.93, 
##         21141.07, 20959.85, 20987.55, 21148.64, 21328.04, 21226.66, 21297.04, 
##         21490.31, 21616.48, 21859.77, 22104.05, 22461.02, 22546.69, 22050.95, 
##         21526.6, 21701.56, 21547.57, 21360.91, 21233.99, 21183.48, 21166.6, 
##         21366.33, 21842.21, 22057.98, 22499.99, 23145.54, 23493.79, 23571.06, 
##         23678.93, 23459.22, 23430.69, 23374.62, 23134.81, 22642, 22285.55, 21789.74, 
##         21229.43, 20878.85, 20220.03, 20293.97, 20178.37, 19882.4, 19762.67, 
##         19677.69, 19544.52, 19064.67, 18250.31, 18307.4, 18392.82, 18233.73, 
##         18376.06, 18729.36, 19036.83, 19339.01, 19814.39, 20290.66, 20465.2, 
##         20403.9, 20802.1, 20744.79, 20698.11, 20590.67, 20324.31, 20767.19, 
##         20929.22, 20736.49, 20615.65, 20401.28, 19870.34, 19479.26, 18707.66, 
##         18502.52, 18270.13, 18287.08, 18112.23, 17980.91, 17872.28, 17731.12, 
##         17561.68, 17496.12, 17677.09, 18070.12, 18749.45, 19161.59, 19219.57, 
##         19474.42, 19424.65, 19574.18, 19286.96, 18968.33, 19002.38, 19032.34, 
##         19059.37, 19111.29, 18796.55, 18829.35, 18344.45, 18016.76, 17936.5, 
##         17853.9, 18175.65, 18589.65, 18650.37, 18684.45, 18688, 18427.17, 18597.56, 
##         18574.65, 18362.37, 18250.84, 17901.32, 17722.78, 17529.95, 17628.84, 
##         17654.74, 17640.96, 17747.36, 17819.81, 17698.79, 17323.82, 17221.57, 
##         17720.49, 17750.43, 17470.13, 17253.81, 17086.22, 17314.21, 16730.86, 
##         15946.06, 15339.73, 14824.91, 14722.66, 14311.28, 14185.39, 14056.04, 
##         14227.64, 13957.79, 13756.96, 13707.89, 13744.82, 13801.14, 13369.54, 
##         13617.03, 13592.06, 13352.54, 13677.48, 13637.83, 13820.22, 13605.06, 
##         13540.25, 13900.22, 14579.97, 14867.78, 15052.04, 15330.75, 15559.16, 
##         15491.72, 15431.59, 15211.1, 15107.64, 15115.29, 14997.65, 14806.37, 
##         14683.38, 14773.58, 14609.81, 14364.36, 14375.7, 14411.71, 14248.86, 
##         14146.39, 13967.17, 13824.95, 14265.51, 14125.92, 14013.75, 13824.1, 
##         13870.62, 13900.4, 14190.36, 14588.3, 14709.27, 14762.76, 14943.17, 
##         14939.74, 14939.37, 14896.18, 14632.29, 14441.63, 14493.98, 14045.45, 
##         14290.97, 14179.12, 13833.47, 13820.27, 13541.26, 13177.71, 13153.86, 
##         13448.59, 13456.01, 13499.59, 13671.62, 13297.99, 13289.16, 13298.42, 
##         13082.67, 12841.25, 12737.3, 12579.18, 12499.5, 12228.38, 12584.6, 12585.01, 
##         12826.35, 13270.41, 13609.71, 13870.63, 13987.58, 13974.83, 13610.81, 
##         12942.9, 12807.32, 12994.82, 13043.42, 12935.38, 12656.04, 12699.06, 
##         12814.45, 12611.6, 12379.99, 11944.14, 11893.42, 11941.85, 12474.2, 
##         12477.41, 13064.92, 12944.95, 12381.72, 12116.44, 12076.94, 12025.01, 
##         12045.14, 12170.61, 12188.64, 12551, 12506.17, 12767.66, 13133.46, 13095.83, 
##         13196.68, 13220.06, 13293.04, 13529.41, 13367.19, 13080.15, 13283.11, 
##         13011.9, 13010.93, 13266.66, 13270.75, 12950.41, 12795.41, 12620, 12689.02, 
##         12544.58, 12358.02, 12127.7, 12187.37, 12225.27, 12210.94, 12053.35, 
##         12087.73, 12437.37, 12589.93, 12682.8, 13006.65, 13400.51, 13676.59, 
##         13735.66, 13718.91, 13591.7, 13342.74, 13462.97, 13708.61, 13621.41, 
##         13700.07, 13700.27, 13745.89, 13630.08, 13780.62, 13936.12, 14087.8, 
##         13769.93, 13427.26, 13208.37, 13075.96, 13175.21, 13147.29, 13026.48, 
##         12962.82, 12570.63, 12154.06, 11704.82, 11695.93, 11754.36, 11526.4, 
##         11683.72, 12037.77, 12407.73, 12584.65, 12369.33, 12142.4, 12206.18, 
##         12421.23, 12260.82, 12375.77, 12439.38, 12448.46, 12307.76, 12128.61, 
##         12213.02, 12339.53, 12151.6, 12037.83, 12041.64, 11951.36, 11633.04, 
##         11673.6, 11840.46, 11731.43, 11918.39, 12202.55, 12014.09, 11798.28, 
##         11841.64, 11886.77, 11838.26, 12048.62, 12105.2, 12393.83, 12800.83, 
##         12792.07, 12659.74, 13210.27, 13410.58, 13251.07, 13264.94, 13184.83, 
##         13405.12, 13179.39, 13105.8, 12939.77, 13030.96, 13083.19, 12859.83, 
##         12794.06, 12785.62, 12579.34, 12420.69, 12347.31, 12286.45, 12210.18, 
##         12134.48, 11894.45, 11877.87, 11737.96, 11968.3, 11859.73, 12072.07, 
##         12268.64, 12460.24, 12924.85, 13398.04, 13848.04, 13876.49, 14137.35, 
##         13944.04, 13800.57, 13911.44, 14227.73, 14364.34, 14288.35, 13837.42, 
##         13929.16, 13729.32, 13634.34, 13593.98, 13701.75, 13561.31, 13681.57, 
##         13760.61, 13801.05, 13594.76, 13559.76, 13551.56, 13629.3, 13660.28, 
##         13550.02, 13553.12, 13807.47, 13920.48, 13591.92, 13478.51, 13517.68, 
##         13336.71, 13509.78, 13486.38, 13375.74, 13522.23, 13810.01, 13810.94, 
##         13368.52, 13274.03, 13672.04, 13811.24, 14290.35, 14758.53, 14932.49, 
##         14821.98, 14755.68, 15047.95, 15314.82, 15481.83, 15370.51, 15117.11, 
##         15143.79, 15358.93, 16218.67, 16524.81, 16302.59, 16240.01, 16057.47, 
##         16215.58, 15684.04, 15362.09, 15684.7, 16037.06, 16083.4, 16264.23, 
##         16737.16, 16868.49, 17158.9, 17248.46, 17307.52, 17171.64, 16858.6, 
##         16798.99, 16709.52, 16672.01, 16794.09, 16698.01, 16389.78, 16292.36, 
##         16086.02, 16125.61, 16143.33, 16132.47, 16131.34, 16051, 15915.95, 15819.17, 
##         15626.2, 15590.65, 15888.99, 15931.82, 16192.02, 16337.93, 16560.28, 
##         17100.17, 17503.99, 17523.13, 17654.56, 17674.76, 17630.04, 17522.87, 
##         17709.34, 17893.69, 17578.91, 17166.27, 17473.69, 17222.36, 17071.34, 
##         17083.82, 16975.88, 16927.01, 16876.2, 16836.43, 16924.96, 16780.87, 
##         16796.18, 16812.8, 16580, 16250.13, 16126.39, 15665.48, 15487.94, 15244.41, 
##         15138.84, 15026.17, 15200.17, 15366.02, 15626.36, 15920.51, 16046.36, 
##         15893.9, 15602.22, 15243.6, 15436.93, 15725, 15988.32, 16028.8, 16400.58, 
##         16795.54, 16656.68, 16575.75, 16568.1, 16465.75, 16495.77, 16213.31, 
##         16194, 16330.26, 16448.99, 16470.75, 16744.7, 16690.73, 16674.59, 16185.65, 
##         16519.62, 16582.25, 16270.86, 16330.01, 16703.77, 17208.72, 17382.25, 
##         17604.16, 18073.69, 18354, 18268.4, 18379.46, 18476.81, 18302.84, 18072.45, 
##         17961.8, 17969.11, 17949.82, 18041.99, 18171.52, 18115.33, 18048.32, 
##         17997.43, 17884.06, 17682.16, 17611.71, 17904.44, 17729.99, 17528.3, 
##         17414.43, 17273.74, 17230.89, 17008.69, 17018.58, 17329.97, 17654.21, 
##         18409.04, 18656.47, 19083.25, 19364.23, 19697.68, 19496.72, 18987.73, 
##         19039.47, 19102.83, 18852.04, 18428.39, 17966.28, 17982.32, 18092.84, 
##         17867.57, 17818.16, 17707.33, 17554.53, 17400.71, 17290.7, 17388.93, 
##         17295.87, 17356.03, 17319.39, 17208.8, 17058.18, 16751.02, 16400.09, 
##         16608.55, 16577.36, 16563.84, 16664.46, 16811.07, 17097.64, 17392.69, 
##         17429.06, 18089.14, 18175.47, 18364.04, 18789.63, 18765.58, 18687.04, 
##         18712.02, 18732.64, 18729.75, 18454.81, 18234.68, 18014.24, 17812.4, 
##         17646.61, 17080.83, 16816.78, 16900.06, 16776.34, 16668.19, 16668.06, 
##         16918.4, 17089.61, 16782.58, 16664.59, 16742.95, 16897.26, 17282.74, 
##         17496.15, 17729.9, 18230.92, 18446.35, 19079.35, 19904.79, 20226.41, 
##         20310.05, 20328.36, 20158.81, 20124.35, 19788.43, 19579.14, 19333.87, 
##         18894.66, 18666.55, 18552.66, 18616.58, 18352.52, 18230.94, 18233.09, 
##         17958.13, 17797.92, 17606.37, 17275.43, 17154.58, 17121.85, 17098.05, 
##         17020.47, 17030.54, 17288.31, 17568.81, 17909.05, 18178.97, 18916.62, 
##         19486.62, 19498.28, 19930.2, 20139.4, 20278.96, 20081.34, 20470.47, 
##         20137.33, 19666.6, 18966.84, 18835.83, 18777.27, 18569.62, 18601.45, 
##         18911.4, 19034.75, 19267.8, 19262.32, 19383.85, 19181.6, 19438.62, 19279.24, 
##         18998.75, 18935.77, 18705.78, 18297.5, 18675.37, 18913.24, 18976.5, 
##         18969.84, 19279.81, 19419.6, 19448.91, 20161.27, 20626, 20428.31, 20627.93, 
##         20572.48, 20872.43, 21039.58, 20833.91, 20475.44, 20558.47, 20391.82, 
##         20116.36, 19764.78, 19446.7, 19258.93, 18666.56, 18523.74, 18217.36, 
##         17922.19, 17598.1, 17361.53, 17661.38, 17894.33, 17360.44, 17524.17, 
##         17747.09, 17750.42, 17764.87, 17780.27, 17807.52, 18001.85, 18113.79, 
##         18318.77, 18921.44, 19614.43, 19521.68, 19463.55, 19562.41, 19370.2, 
##         19352.58, 19231.12, 18723.07, 18850.72, 18513.06, 18419.62, 18389.81, 
##         18088.28, 18103.83, 17811.26, 17845.89, 17809.72, 17564.78, 17314.17, 
##         17212.03, 17253.97, 17318.35, 17468.03, 17497.12, 17447.45, 17666.55, 
##         18260.74, 19004.77, 19637.03, 20194.89, 20454.46, 20762.48, 20725.54, 
##         20555.47, 20508.19, 20359.44, 20009.57, 19966.41, 20176.37, 20164.35, 
##         19821.72, 19678.38, 19734.53, 19589.58, 19783.81, 19666.71, 19872.05, 
##         19851.5, 19656.65, 19877.55, 19949.92, 20105.52, 20174.22, 20045.68, 
##         19937.6, 19819.2, 19761.81, 19497.85, 19484.8, 19628.33, 19893.4, 20125.15, 
##         20311.51, 20578.78, 20831.6, 21127.55, 21332.63, 21310, 21312.48, 21324.83, 
##         21007.82, 20789.23, 20757.35, 20387.78, 20357.15, 20148.91, 19774.01, 
##         19566.34, 19026.83, 18737.47, 18538.15, 18295.51, 18596.57, 19363.75, 
##         19547.24, 19408.55, 18994.41, 18781.34, 18930.02, 19043.16, 19187.53, 
##         19298, 19554.11, 19798.43, 20138.96, 20763.65, 20940.18, 21073.83, 21028.33, 
##         21132.61, 21114.34, 20624.53, 20120.62, 20270.23, 20053.86, 20056.94, 
##         19841.38, 19851.18, 19687, 19656.69, 19280.6, 19082.25, 18979.57, 18659.33, 
##         18474.96, 18371.59, 18382.99, 18403.87, 18397.41, 18123.28, 18247.73, 
##         18645.36, 19342.71, 19998.34, 20754.58, 21147.82, 21389.29, 21405.18, 
##         21423.69, 21620.88, 21931.36, 22024.51, 21876.16, 21562.62, 21049.54, 
##         20962.2, 20718.93, 20808.75, 20999.17, 21093.91, 20761.59, 20405.87, 
##         20483.19, 20523.87, 20563.39, 20783.21, 20779.78, 21009.84, 21078.86, 
##         21103.02, 20787.27, 20634.23, 20486.22, 20303.64, 20091.34, 20260.5, 
##         20680.43, 21126.42, 21284.19, 21762.84, 21790.86, 22087.47, 22306.71, 
##         22153.05, 22344.88, 22627.46, 22244.11, 22265.4, 22324.19, 22179.77, 
##         22105.64, 21623.26, 21259.31, 20853.51, 20284.94, 20330.65, 20279.34, 
##         19737.32, 19125.11, 18658.77, 18414.23, 18308.92, 18073.48, 18116.47, 
##         18346.22, 18397.54, 18596.03, 18880.58, 19182.36, 19236.84, 19511.2, 
##         20043.85, 20561.09, 20708.86, 20525.42, 20486.22, 20395.07, 20159.59, 
##         20005.33, 19859.91, 19673.67, 19768.41, 19370.51, 19072.01, 19045.46, 
##         18940.93, 18925.49, 18982.16, 19038.81, 19006.63, 18833.01, 18690.19, 
##         18615.7, 18761.24, 18394.55, 18399.24, 18450.19, 18405.73, 18809.31, 
##         19579.17, 20286.68, 20915.73, 21058.67, 21451.59, 21586.06, 21450.95, 
##         21625.84, 21564.58, 21407.21, 21240, 20988.5, 21124.37, 21246, 21238.47, 
##         21333.42, 21444.41, 21626.31, 21543.8, 21328.36, 21920.89, 21776.28, 
##         21453.53, 21248.45, 21234.92, 20779.94, 20441.35, 20112.94, 20027.34, 
##         20003.21, 20050.66, 20351.13, 20543.92, 20791.49, 20966.73, 21386.89, 
##         21944.4, 21923.87, 21877.92, 21788.72, 21903.04, 21985.6, 21739.45, 
##         21532.53, 21232.89, 21030.08, 20660.88, 20432.97, 20266.93, 19885.41, 
##         19034.93, 18391.03, 18361.81, 18202.56, 18090.49, 17863.64, 17871.93, 
##         17852.67, 17441.3, 17117.66, 17164.53, 17715.73, 18039.6, 17848.37, 
##         17916.65, 18220.08, 18775.2, 19112.11, 19521.56, 19813.27, 20044.3, 
##         19880.75, 20078.42, 19934.33, 19304.57, 19077.58, 19369.1, 19556.24, 
##         19327.47, 19360.6, 19504.08, 19505.15, 19324.39, 19217.47, 19294.98, 
##         19072.71, 19071.35, 18961.3, 18675.94, 18481.16, 18212.5, 18102.88, 
##         18296.44, 18578.93, 18802.12, 19157.47, 19947.69, 20532.27, 20610.35, 
##         20466.67, 20301.93, 20530.58, 20744.01, 20872.95, 20948.11, 20749.12, 
##         20553.35, 19508.39, 19122.49, 19023.48, 18818.18, 18670.52, 18929.57, 
##         18897.22, 18479.07, 18640.31, 18984.97, 18938.54, 18738.63, 18881.39, 
##         18898.86, 18886.33, 18682.42, 18315.78, 18432.9, 18251.18, 18124.82, 
##         18187.62, 18502.97, 18793.55, 19074.55, 19394.53, 20036.92, 20049.98, 
##         19996.69, 19920.82, 19537.94, 19628.1, 20229.72, 20542.1, 20848.13, 
##         21046.63, 20559.6, 19876.85, 19717.53, 19638.52, 19445.61, 18758.52, 
##         18556.07, 18596.54, 18815.4, 18685.41, 18739.94, 18769.21, 18229.85, 
##         18080.37, 18081.81, 18255.37, 18282.53, 18127.37, 18065.99, 18164.7, 
##         18894.06, 19295.05, 19786.17, 19885.92, 19683.89, 19746.75, 19941.33, 
##         20313.97, 19783.83, 19809.35, 19923.84, 19813.77, 19703.43, 19591.83, 
##         19602.65, 19307.75, 19201.47, 19166.7, 18970.5, 18770.52, 18816.42, 
##         18636.58, 18471.55, 18534.9, 18572.42, 18405.08, 18517.41, 18804.6, 
##         19123.54, 19619.18, 20306.09, 21330.14, 21722.75, 21644.69, 21647.55, 
##         21706.63, 21620.56, 21605.59, 21683.84, 21512.95, 21003.57, 20165.94, 
##         19896.1, 19568.24, 19305.24, 19262.77, 19160.89, 19211.09, 19624.03, 
##         19386.36, 19407.53, 19383.47, 19301.93, 19357.84, 19420.26, 19495.04, 
##         19568.23, 19516.96, 19834.69, 19972.81, 19854.82, 19757.22, 20193.67, 
##         20544.94, 20795.48, 21088.49, 21697.58, 22190.35, 22234.22, 22237.84, 
##         22201.78, 21912.72, 21738.63, 21148.62, 21396.79, 21386.69, 21350.88, 
##         21066.51, 21027.89, 20627.72, 20099.31, 19445.65, 19009.16, 18776.07, 
##         18890.31, 18652.58, 18541.16, 18526.26, 18604.27, 18748.38, 18960.71, 
##         18825.47, 18465.49, 18604.97, 19150.89, 19728.74, 19863.55, 20070.73, 
##         20827.37, 21203.05, 21465.16, 21618.05, 21567.66, 21872.74, 21695.97, 
##         21527.18, 21530.57, 21328.4, 21369.06, 21246.77, 20959.3, 20754.01, 
##         20451.52, 19935.47, 19575.83, 19385.43, 19431.28, 19565.13, 19454.52, 
##         19551.06, 19742.83, 19765.81, 19788.05, 19709.99, 19805.73, 19776.7, 
##         20471.98, 20957.92, 21141.48, 21661.96, 21854.95, 21859.64, 21925.44, 
##         21751.32, 21864.61, 21364.97, 20876.42, 20177.2, 20065.02, 20028.08, 
##         19765.67, 19681.23, 19578.05, 19543.02, 19605.95, 19841.96, 19923.71, 
##         19764.32, 19824.46, 20002.7, 20067.85, 20061.62, 20159.94, 19918.19, 
##         19945.12, 19803.34, 19765.08, 19773.59, 20116.17, 20961.53, 21663.58, 
##         21786.47, 22318.7, 22498.41, 22419.74, 22249.54, 22038.97, 22164.84, 
##         22029.55, 21678.52, 21665.57, 21477.29, 20994.46, 20655.38, 20606.22, 
##         20595.41, 20311.26, 19609.14, 19493.77, 19225.75, 18838.13, 18763.45, 
##         19065.89, 19195.47, 18737.52, 18609.5, 18533.16, 18508.24, 18518.65, 
##         18611.83, 18741.72, 18737.93, 18852.24, 18820.88, 19300.69, 19461.64, 
##         19654.11, 19833.11, 19833.17, 19769.29, 19584.56, 19287.81, 19109.45, 
##         19437.91, 19551.31, 19283.53, 19551.26, 19587.11, 19589.01, 19342.44, 
##         19264.82, 19223.3, 19109.72, 18999.64, 19065.79, 19330.64, 19419.46, 
##         19400.37, 19162, 19234.37, 19650.48, 19886.38, 20467.19, 21067.91, 21527.02, 
##         21833.07, 22191.25, 21953.5, 21767.54, 21736.98, 21915.2, 21510.33, 
##         21384.44, 21130.67, 21248.25, 21331.54, 21312.21, 21571.09, 21506.21, 
##         21160.85, 21184.41, 21024.21, 21410.04, 21564.92, 21298.16, 21409.08, 
##         21367.62, 21307.06, 21308.81, 20830.61, 20941.44, 21276.43, 21567.01, 
##         21408.52, 21852.98, 22086.9, 22120.56, 22096.66, 22241.28, 22017.82, 
##         22255.58, 22416.15, 22062.27, 22425.26, 21941.87, 21321.81, 21171.21, 
##         20899.4, 20536.46, 20288.23, 20197.35, 20207.06, 19737.24, 19162.1, 
##         19004.87, 18693.44, 18390.61, 18762.42, 18777.67, 18792.27, 18597.15, 
##         18334.29, 18335.22, 18194.67, 18109.13, 18095.2, 18175.7, 18302.6, 18266.69, 
##         18810.87, 19174.24, 19462.65, 20023.86, 20255.21, 20342.97, 20367.34, 
##         19974.67, 20174.67, 20426.53, 20096.86, 20010.51, 19934.76, 19915.75, 
##         19816.97, 19552.52, 19531.58, 19858.08, 19914.68, 20047.86, 20449.82, 
##         20560.55, 20506.62, 20535.67, 20497.38, 20532.19, 20356.57, 20352.97, 
##         20621.94, 21029.03, 21491.3, 21738.31, 21809.36, 21824.27, 21537.32, 
##         21443.5, 21652.65, 21879.16, 22145.25, 21770.55, 21144.26, 20756.37, 
##         20422.7, 20323.16, 20121.18, 20108.28, 20076.72, 19843.88, 19917.6, 
##         20082.26, 19859.19, 19912.95, 20099.07, 20353.88, 20529.86, 20384.88, 
##         20273.55, 20548.98, 20556.22, 20471.39, 20551.09, 20678.13, 20605.21, 
##         20313.03, 20426.6, 20657.63, 20959.17, 20965.95, 20947.37, 20633.84, 
##         20655.57, 20792.14, 20522.98, 20527.85, 20048.44, 19468.07, 19074.97, 
##         18643.19, 18348.27, 17895.93, 17410.99, 17035.03, 16728.06, 16298.17, 
##         16542.78, 17120.48, 17758.16, 17871.71, 17650.82, 17774.45, 18066.79, 
##         17762.07, 17323.28, 17413.73, 17740.54, 18438.32, 18960.57, 19393.91, 
##         19673.52, 19628.14, 19766.19, 19805.82, 19458.31, 18765.82), .Tsp = c(1, 
##         30.9895833333333, 96), class = "ts")), class = "data.frame", row.names = c(NA, 
##     -2880L)))
## 
## Coefficients:
##          ar1     ma1  fourier_vec_timestamp_period_32    sunday  saturday
##       0.2470  0.1700                         912.3212  140.4951   60.6127
## s.e.  0.0475  0.0487                          48.4232   86.5159   86.5027
## 
## sigma^2 estimated as 54993:  log likelihood = -19794.78,  aic = 39601.57

Investigate - Modeltime Workflow

Next, we need to investigate our ARIMA models.

Model Table

Use modeltime_table() to consolidate Models 1 - 5 (ARIMA models). Save the modeltime table as model_tbl_arima.

model_tbl_arima <- modeltime_table(
    model_fit_1_arima_basic,
    model_fit_2_arima_xregs,
    model_fit_3_arima_sarimax,
    model_fit_4_arima_sarimax,
    model_fit_5_arima_xreg_fourier
)

model_tbl_arima
## # Modeltime Table
## # A tibble: 5 x 3
##   .model_id .model   .model_desc                                   
##       <int> <list>   <chr>                                         
## 1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]                       
## 2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1)[96] ERRORS
## 3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0)[32] ERRORS
## 4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1)[32] ERRORS
## 5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS

Calibration Table

Use modeltime_calibrate() to calibrate your models on the testing split.

calibration_tbl <- model_tbl_arima %>%
    modeltime_calibrate(testing(splits))

calibration_tbl
## # Modeltime Table
## # A tibble: 5 x 5
##   .model_id .model   .model_desc                                    .type .calibration_da~
##       <int> <list>   <chr>                                          <chr> <list>          
## 1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]                        Test  <tibble [96 x 4~
## 2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1)[96] ERRORS Test  <tibble [96 x 4~
## 3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0)[32] ERRORS Test  <tibble [96 x 4~
## 4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1)[32] ERRORS Test  <tibble [96 x 4~
## 5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS            Test  <tibble [96 x 4~

Test Accuracy

Use modeltime_accuracy() to calculate the test accuracy.

calibration_tbl %>% 
    modeltime_accuracy() 
## # A tibble: 5 x 9
##   .model_id .model_desc                .type   mae  mape  mase smape  rmse   rsq
##       <int> <chr>                      <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1         1 ARIMA(4,1,4)(0,1,0)[96]    Test  1005.  5.07  3.76  5.28 1268. 0.574
## 2         2 REGRESSION WITH ARIMA(0,0~ Test   823.  4.19  3.08  4.18  978. 0.526
## 3         3 REGRESSION WITH ARIMA(3,0~ Test  2085. 10.5   7.80 11.1  2268. 0.493
## 4         4 REGRESSION WITH ARIMA(2,1~ Test  2231. 11.1   8.35 11.9  2406. 0.506
## 5         5 REGRESSION WITH ARIMA(1,1~ Test  2292. 11.4   8.58 12.2  2482. 0.428

Test Forecast

Make a test forecast using modeltime_forecast() and plot_modeltime_forecast(). Use the testing split and the data_prepared_tbl.

calibration_tbl %>%
    modeltime_forecast(
        new_data = testing(splits),
        actual_data = data_prepared_tbl
    ) %>% 
    plot_modeltime_forecast()

ARIMA Forecast Review

  • Which ARIMA forecasts performed the best on the test data set?
    • Which ARIMA forecasts had the lowest MAE / RMSE?
    • Which ARIMA forecasts had the highest variance explained
  • How did the forecasts do predicting the global trend?
  • How did the forecasts do predicting the local trend?
# Checkpoint data
 #model_tbl_arima %>% write_rds("data/model_tbl_arima.rds")
model_tbl_arima <- read_rds("data/model_tbl_arima.rds")
model_tbl_arima
## # Modeltime Table
## # A tibble: 5 x 3
##   .model_id .model   .model_desc                                   
##       <int> <list>   <chr>                                         
## 1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]                       
## 2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1)[96] ERRORS
## 3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0)[32] ERRORS
## 4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1)[32] ERRORS
## 5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS

Prophet

Next, let’s experiment with the prophet algorithm.

Model 6 - Basic Prophet

First, train a basic prophet model:

  • Start with prophet_reg(). Use the default parameters.
  • Set the engine to “prophet”
  • Fit the model to the training data using total_drawl ~ timestamp
  • Store the model as model_fit_6_prophet_basic
# model_fit_6_prophet_basic <- prophet_reg(seasonality_yearly = FALSE) %>%
#     set_engine("prophet") %>%
#   
#     fit(total_drawl ~ timestamp, data = training(splits))



#write_rds(model_fit_6_prophet_basic, "data/model_fit_6_prophet_basic.rds")

# Checkpoint data
model_fit_6_prophet_basic  <- read_rds("data/model_fit_6_prophet_basic.rds")

model_fit_6_prophet_basic
## parsnip model object
## 
## Fit time:  11.5s 
## PROPHET Model
## - growth: 'linear'
## - n.changepoints: 25
## - changepoint.range: 0.8
## - yearly.seasonality: 'FALSE'
## - weekly.seasonality: 'auto'
## - daily.seasonality: 'auto'
## - seasonality.mode: 'additive'
## - changepoint.prior.scale: 0.05
## - seasonality.prior.scale: 10
## - holidays.prior.scale: 10
## - logistic_cap: NULL
## - logistic_floor: NULL
## - extra_regressors: 0

Model 7 - Turn on yearly seasonality

Next, let’s try toggling yearly seasonality on. Make a new model called model_fit_7_prophet_yearly with seasonality_yearly = TRUE.

# model_fit_7_prophet_yearly <- prophet_reg(seasonality_yearly = FALSE) %>%
#     set_engine("prophet") %>%
#     fit(total_drawl ~ timestamp, data = training(splits))

#write_rds(model_fit_7_prophet_yearly, "data/model_fit_7_prophet_yearly.rds")

# Checkpoint data
model_fit_7_prophet_yearly  <- read_rds("data/model_fit_7_prophet_yearly.rds")


model_fit_7_prophet_yearly
## parsnip model object
## 
## Fit time:  9.1s 
## PROPHET Model
## - growth: 'linear'
## - n.changepoints: 25
## - changepoint.range: 0.8
## - yearly.seasonality: 'FALSE'
## - weekly.seasonality: 'auto'
## - daily.seasonality: 'auto'
## - seasonality.mode: 'additive'
## - changepoint.prior.scale: 0.05
## - seasonality.prior.scale: 10
## - holidays.prior.scale: 10
## - logistic_cap: NULL
## - logistic_floor: NULL
## - extra_regressors: 0

Model 8 - weekend Events

Let’s try one without yearly seasonality but now adding events. Make model_fit_8_prophet_events using the default settings for prophet_reg() and updating the fitting formula to include event_november_weekend and event_weekend_launch.

# model_fit_8_prophet_events <- prophet_reg() %>%
#     set_engine("prophet") %>%
#     fit(total_drawl ~ timestamp 
#         + sunday
#         + saturday, 
#         data = training(splits))

#write_rds(model_fit_8_prophet_events, "data/model_fit_8_prophet_events.rds")

# Checkpoint data
model_fit_8_prophet_events  <- read_rds("data/model_fit_8_prophet_events.rds")

model_fit_8_prophet_events
## parsnip model object
## 
## Fit time:  8.1s 
## PROPHET w/ Regressors Model
## - growth: 'linear'
## - n.changepoints: 25
## - changepoint.range: 0.8
## - yearly.seasonality: 'auto'
## - weekly.seasonality: 'auto'
## - daily.seasonality: 'auto'
## - seasonality.mode: 'additive'
## - changepoint.prior.scale: 0.05
## - seasonality.prior.scale: 10
## - holidays.prior.scale: 10
## - logistic_cap: NULL
## - logistic_floor: NULL
## - extra_regressors: 2

Model 9 - Events + Fourier Series

Let’s try one more model that includes the events and a fourier series. Add a fourier_vec() with period = 4. Save this model as model_fit_9_prophet_events_fourier.

# model_fit_9_prophet_events_fourier <- prophet_reg(seasonality_yearly = FALSE) %>%
#     set_engine("prophet") %>%
#     fit(total_drawl ~ timestamp 
#         + fourier_vec(timestamp, period = c(32,64,96))
#         + sunday
#         + saturday, 
#         data = training(splits))

#write_rds(model_fit_9_prophet_events_fourier, "data/model_fit_9_prophet_events_fourier.rds")

# Checkpoint data
model_fit_9_prophet_events_fourier  <- read_rds("data/model_fit_9_prophet_events_fourier.rds")

model_fit_9_prophet_events_fourier
## parsnip model object
## 
## Fit time:  7s 
## PROPHET w/ Regressors Model
## - growth: 'linear'
## - n.changepoints: 25
## - changepoint.range: 0.8
## - yearly.seasonality: 'FALSE'
## - weekly.seasonality: 'auto'
## - daily.seasonality: 'auto'
## - seasonality.mode: 'additive'
## - changepoint.prior.scale: 0.05
## - seasonality.prior.scale: 10
## - holidays.prior.scale: 10
## - logistic_cap: NULL
## - logistic_floor: NULL
## - extra_regressors: 3

Investigate - Modeltime Workflow

Now let’s check out the results.

Model Table

Create a modeltime table with each of the prophet models 6-9 in the table. Store as model_tbl_prophet.

model_tbl_prophet <- modeltime_table(
    model_fit_6_prophet_basic,
    model_fit_7_prophet_yearly,
    model_fit_8_prophet_events,
    model_fit_9_prophet_events_fourier
)

model_tbl_prophet
## # Modeltime Table
## # A tibble: 4 x 3
##   .model_id .model   .model_desc          
##       <int> <list>   <chr>                
## 1         1 <fit[+]> PROPHET              
## 2         2 <fit[+]> PROPHET              
## 3         3 <fit[+]> PROPHET W/ REGRESSORS
## 4         4 <fit[+]> PROPHET W/ REGRESSORS

Calibration Table

Next, calibrate the models using your testing set.

calibration_tbl <- model_tbl_prophet %>%
    modeltime_calibrate(testing(splits))

calibration_tbl
## # Modeltime Table
## # A tibble: 4 x 5
##   .model_id .model   .model_desc           .type .calibration_data
##       <int> <list>   <chr>                 <chr> <list>           
## 1         1 <fit[+]> PROPHET               Test  <tibble [96 x 4]>
## 2         2 <fit[+]> PROPHET               Test  <tibble [96 x 4]>
## 3         3 <fit[+]> PROPHET W/ REGRESSORS Test  <tibble [96 x 4]>
## 4         4 <fit[+]> PROPHET W/ REGRESSORS Test  <tibble [96 x 4]>

Test Accuracy

Calculate the accuracy with modeltime_accuracy().

calibration_tbl %>% modeltime_accuracy()
## # A tibble: 4 x 9
##   .model_id .model_desc           .type   mae  mape  mase smape  rmse   rsq
##       <int> <chr>                 <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1         1 PROPHET               Test   714.  3.55  2.67  3.62  874. 0.641
## 2         2 PROPHET               Test   714.  3.55  2.67  3.62  874. 0.641
## 3         3 PROPHET W/ REGRESSORS Test   685.  3.41  2.56  3.46  862. 0.616
## 4         4 PROPHET W/ REGRESSORS Test   691.  3.43  2.59  3.49  867. 0.616

Test Forecast

Finally, forecast the calibrated models on the testing data using modeltime_forecast() and plot_modeltime_forecast().

calibration_tbl %>%
    modeltime_forecast(
        new_data = testing(splits),
        actual_data = data_prepared_tbl
    ) %>% 
    plot_modeltime_forecast()

Prophet Forecast Review

  • Which Prophet forecasts performed the best on the test data set?
    • Which Prophet forecasts had the lowest MAE / RMSE?
    • Which Prophet forecasts had the highest variance explained
  • How did the forecasts do predicting the global trend?
  • How did the forecasts do predicting the local trend?
# Checkpoint data
#model_tbl_prophet %>% write_rds("data/model_tbl_prophet.rds")
model_tbl_prophet <- read_rds("data/model_tbl_prophet.rds")
model_tbl_prophet
## # Modeltime Table
## # A tibble: 4 x 3
##   .model_id .model   .model_desc          
##       <int> <list>   <chr>                
## 1         1 <fit[+]> PROPHET              
## 2         2 <fit[+]> PROPHET              
## 3         3 <fit[+]> PROPHET W/ REGRESSORS
## 4         4 <fit[+]> PROPHET W/ REGRESSORS

Exponential Smoothing

Now let’s try models that incorporate exponential smoothing.

Model 10 - ETS

The first model we’ll experiment with is the automated “ETS” model:

  • Start with exp_smoothing()
  • Set the engine to “ets”
  • Fit the model to the training data using a formula total_drawl ~ timestamp
  • Save the model as model_fit_10_ets

Question:

  • Review the ETS parameters:
    • Is this an exponentially smoothed error model?
    • Is this a trend model
    • Is this a seasonal model?
  • How does the AIC compare to the AIC of the ARIMA model?
# model_fit_10_ets <- exp_smoothing() %>%
#     set_engine("ets") %>%
#     fit(total_drawl ~ timestamp, training(splits))


#write_rds(model_fit_10_ets, "data/model_fit_10_ets.rds")

# Checkpoint data
model_fit_10_ets  <- read_rds("data/model_fit_10_ets.rds")

model_fit_10_ets
## parsnip model object
## 
## Fit time:  1.5s 
## ETS(A,Ad,N) 
## 
## Call:
##  forecast::ets(y = outcome, model = model_ets, damped = damping_ets,  
## 
##  Call:
##      alpha = alpha, beta = beta, gamma = gamma) 
## 
##   Smoothing parameters:
##     alpha = 0.9999 
##     beta  = 0.549 
##     phi   = 0.8 
## 
##   Initial states:
##     l = 19378.1338 
##     b = -15.9314 
## 
##   sigma:  249.8524
## 
##      AIC     AICc      BIC 
## 54747.98 54748.01 54783.77

Model 11 - TBATS

Next, let’s make a TBATS model. The seasonality we’ll use is seasonal_period_1 = 32 and seasonal_period_2 = 13.

# model_fit_11_tbats <- seasonal_reg(
#     seasonal_period_1 = 32,
#     seasonal_period_2 = 64,
#     seasonal_period_3 = 96
# ) %>%
#     set_engine("tbats") %>%
#     fit(total_drawl ~ timestamp, data = training(splits))

#write_rds(model_fit_11_tbats, "data/model_fit_11_tbats.rds")

# Checkpoint data
model_fit_11_tbats  <- read_rds("data/model_fit_11_tbats.rds")

model_fit_11_tbats
## parsnip model object
## 
## Fit time:  4m 14.4s 
## TBATS(0.663, {2,0}, 0.878, {<32,9>, <64,1>, <96,2>})
## 
## Call: forecast::tbats(y = outcome, use.parallel = use.parallel)
## 
## Parameters
##   Lambda: 0.66331
##   Alpha: 1.055057
##   Beta: -0.08392519
##   Damping Parameter: 0.877698
##   Gamma-1 Values: -0.0007980802 0.0003944886 0.0002383434
##   Gamma-2 Values: 5.119689e-05 -1.765662e-05 -0.001910626
##   AR coefficients: 0.342507 0.033985
## 
## Seed States:
##                [,1]
##  [1,] 1013.62438812
##  [2,]    1.50837886
##  [3,]   31.61947352
##  [4,]   -2.06281936
##  [5,]   -2.47078143
##  [6,]   -0.92205503
##  [7,]    0.04283148
##  [8,]   -0.62403041
##  [9,]    0.28521400
## [10,]   -2.09472848
## [11,]    0.21417207
## [12,]  -11.98554575
## [13,]   -8.15518003
## [14,]    3.49859451
## [15,]   -1.67636973
## [16,]   -0.03282173
## [17,]   -0.17225911
## [18,]   -0.06722913
## [19,]    0.60819019
## [20,]    0.26196166
## [21,]   -1.13987187
## [22,]    0.98307723
## [23,]  -25.95417422
## [24,]    4.86816237
## [25,]   13.54126857
## [26,]    8.17676366
## [27,]    0.00000000
## [28,]    0.00000000
## attr(,"lambda")
## [1] 0.6633103
## 
## Sigma: 7.804349
## AIC: 53919.98

Investigate - Modeltime Workflow

Now let’s check out the results.

Model Table

Create a modeltime table with each of the exponential smoothing models 10-11 in the table. Store as model_tbl_exp_smooth.

model_tbl_exp_smooth <- modeltime_table(
    model_fit_10_ets, 
    model_fit_11_tbats
) 

model_tbl_exp_smooth
## # Modeltime Table
## # A tibble: 2 x 3
##   .model_id .model   .model_desc                                         
##       <int> <list>   <chr>                                               
## 1         1 <fit[+]> ETS(A,AD,N)                                         
## 2         2 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>, <64,1>, <96,2>})

Calibration Table

Next, calibrate the models using your testing set.

calibration_tbl <- model_tbl_exp_smooth %>%
    modeltime_calibrate(testing(splits))

calibration_tbl
## # Modeltime Table
## # A tibble: 2 x 5
##   .model_id .model   .model_desc                          .type .calibration_da~
##       <int> <list>   <chr>                                <chr> <list>          
## 1         1 <fit[+]> ETS(A,AD,N)                          Test  <tibble [96 x 4~
## 2         2 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>,~ Test  <tibble [96 x 4~

Test Accuracy

Calculate the accuracy with modeltime_accuracy().

calibration_tbl %>% modeltime_accuracy()
## # A tibble: 2 x 9
##   .model_id .model_desc               .type   mae  mape  mase smape  rmse    rsq
##       <int> <chr>                     <chr> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
## 1         1 ETS(A,AD,N)               Test  2609. 12.9   9.76 14.0  2912. 0.0176
## 2         2 TBATS(0.663, {2,0}, 0.87~ Test   968.  4.81  3.62  4.95 1105. 0.704

Test Forecast

Finally, forecast the calibrated models on the testing data using modeltime_forecast() and plot_modeltime_forecast().

calibration_tbl %>%
    modeltime_forecast(
        new_data = testing(splits),
        actual_data = data_prepared_tbl
    ) %>% 
    plot_modeltime_forecast()

Exponential Smoothing Forecast Review

  • Which Exponential Smoothing forecasts performed the best on the test data set?
    • Which Exponential Smoothing forecasts had the lowest MAE / RMSE?
    • Which Exponential Smoothing forecasts had the highest variance explained
  • How did the forecasts do predicting the global trend?
  • How did the forecasts do predicting the local trend?
# Checkpoint data
#model_tbl_exp_smooth %>% write_rds("data/model_tbl_exp_smooth.rds")
model_tbl_exp_smooth <- read_rds("data/model_tbl_exp_smooth.rds")
model_tbl_exp_smooth
## # Modeltime Table
## # A tibble: 2 x 3
##   .model_id .model   .model_desc                                         
##       <int> <list>   <chr>                                               
## 1         1 <fit[+]> ETS(A,AD,N)                                         
## 2         2 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>, <64,1>, <96,2>})

Forecast Future Data

Forecast the future.

# Checkpoint data
model_tbl_arima      <- read_rds("data/model_tbl_arima.rds")
model_tbl_prophet    <- read_rds("data/model_tbl_prophet.rds")
model_tbl_exp_smooth <- read_rds("data/model_tbl_exp_smooth.rds")

Model Table

Create a Modeltime Table from the 3 previous Modeltime Tables using a new function, combine_modeltime_tables.

Use ?combine_modeltime_tables to learn about how the function works.

Use the function to combine the 3 previous modeltime tables into a single modeltime table. Combine these Modeltime Tables: - model_tbl_arima - model_tbl_prophet - model_tbl_exp_smooth Store the combined modeltime tables as model_tbl

model_tbl <- combine_modeltime_tables(
    model_tbl_arima,
    model_tbl_prophet,
    model_tbl_exp_smooth
)

model_tbl
## # Modeltime Table
## # A tibble: 11 x 3
##    .model_id .model   .model_desc                                         
##        <int> <list>   <chr>                                               
##  1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]                             
##  2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1)[96] ERRORS      
##  3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0)[32] ERRORS      
##  4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1)[32] ERRORS      
##  5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS                 
##  6         6 <fit[+]> PROPHET                                             
##  7         7 <fit[+]> PROPHET                                             
##  8         8 <fit[+]> PROPHET W/ REGRESSORS                               
##  9         9 <fit[+]> PROPHET W/ REGRESSORS                               
## 10        10 <fit[+]> ETS(A,AD,N)                                         
## 11        11 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>, <64,1>, <96,2>})

As a precautionary measure, please refit the models using modeltime_refit(). This prevents models that can go bad over time because of software changes.

# Refitting makes sure your models work over time. 
# model_tbl <- model_tbl %>%
#     modeltime_refit(training(splits))

#write_rds(model_tbl, "data/model_tbl.rds")

# Checkpoint data
model_tbl  <- read_rds("data/model_tbl.rds")

model_tbl
## # Modeltime Table
## # A tibble: 11 x 3
##    .model_id .model   .model_desc                                         
##        <int> <list>   <chr>                                               
##  1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]                             
##  2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1)[96] ERRORS      
##  3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0)[32] ERRORS      
##  4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1)[32] ERRORS      
##  5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS                 
##  6         6 <fit[+]> PROPHET                                             
##  7         7 <fit[+]> PROPHET                                             
##  8         8 <fit[+]> PROPHET W/ REGRESSORS                               
##  9         9 <fit[+]> PROPHET W/ REGRESSORS                               
## 10        10 <fit[+]> ETS(A,AD,N)                                         
## 11        11 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>, <64,1>, <96,2>})

Calibrate the Table

Use testing data to calibrate the model:

  • Start with model_tbl
  • Use modeltime_calibrate() to calibrate the model using testing(splits) (out-of-sample data)
  • Store the result as calibration_tbl
calibration_tbl <- model_tbl %>%
    modeltime_calibrate(testing(splits))


calibration_tbl
## # Modeltime Table
## # A tibble: 11 x 5
##    .model_id .model   .model_desc                         .type .calibration_da~
##        <int> <list>   <chr>                               <chr> <list>          
##  1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]             Test  <tibble [96 x 4~
##  2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1~ Test  <tibble [96 x 4~
##  3         3 <fit[+]> REGRESSION WITH ARIMA(3,0,1)(1,1,0~ Test  <tibble [96 x 4~
##  4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1~ Test  <tibble [96 x 4~
##  5         5 <fit[+]> REGRESSION WITH ARIMA(1,1,1) ERRORS Test  <tibble [96 x 4~
##  6         6 <fit[+]> PROPHET                             Test  <tibble [96 x 4~
##  7         7 <fit[+]> PROPHET                             Test  <tibble [96 x 4~
##  8         8 <fit[+]> PROPHET W/ REGRESSORS               Test  <tibble [96 x 4~
##  9         9 <fit[+]> PROPHET W/ REGRESSORS               Test  <tibble [96 x 4~
## 10        10 <fit[+]> ETS(A,AD,N)                         Test  <tibble [96 x 4~
## 11        11 <fit[+]> TBATS(0.663, {2,0}, 0.878, {<32,9>~ Test  <tibble [96 x 4~

Calculate the Accuracy

Use modeltime_accuracy() to calculate the accuracy metrics.

calibration_tbl %>% modeltime_accuracy()
## # A tibble: 11 x 9
##    .model_id .model_desc              .type   mae  mape  mase smape  rmse    rsq
##        <int> <chr>                    <chr> <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
##  1         1 ARIMA(4,1,4)(0,1,0)[96]  Test  1005.  5.07  3.76  5.28 1268. 0.574 
##  2         2 REGRESSION WITH ARIMA(0~ Test   823.  4.19  3.08  4.18  978. 0.526 
##  3         3 REGRESSION WITH ARIMA(3~ Test  2085. 10.5   7.80 11.1  2268. 0.493 
##  4         4 REGRESSION WITH ARIMA(2~ Test  2231. 11.1   8.35 11.9  2406. 0.506 
##  5         5 REGRESSION WITH ARIMA(1~ Test  2292. 11.4   8.58 12.2  2482. 0.428 
##  6         6 PROPHET                  Test   714.  3.55  2.67  3.62  874. 0.641 
##  7         7 PROPHET                  Test   714.  3.55  2.67  3.62  874. 0.641 
##  8         8 PROPHET W/ REGRESSORS    Test   685.  3.41  2.56  3.46  862. 0.616 
##  9         9 PROPHET W/ REGRESSORS    Test   691.  3.43  2.59  3.49  867. 0.616 
## 10        10 ETS(A,AD,N)              Test  2609. 12.9   9.76 14.0  2912. 0.0176
## 11        11 TBATS(0.663, {2,0}, 0.8~ Test   968.  4.81  3.62  4.95 1105. 0.704

Visualize the Model Forecast

  • Use modeltime_forecast():
    • Set new_data = testing(splits)
    • Set actual_data = data_prepared_tbl
  • Pipe the result into plot_modeltime_forecast()
calibration_tbl %>%
    modeltime_forecast(
        new_data    = testing(splits),
        actual_data = data_prepared_tbl
    ) %>%
    plot_modeltime_forecast()

Refit

  • Start with the calibration_tbl
  • Use modeltime_refit() refit the model on the data_prepared_tbl dataset
# refit_tbl <- calibration_tbl %>%
#     modeltime_refit(data_prepared_tbl)


#write_rds(refit_tbl, "data/refit_tbl.rds")

# Checkpoint data
refit_tbl  <- read_rds("data/refit_tbl.rds")

refit_tbl
## # Modeltime Table
## # A tibble: 11 x 5
##    .model_id .model   .model_desc                         .type .calibration_da~
##        <int> <list>   <chr>                               <chr> <list>          
##  1         1 <fit[+]> ARIMA(4,1,4)(0,1,0)[96]             Test  <tibble [96 x 4~
##  2         2 <fit[+]> REGRESSION WITH ARIMA(0,0,1)(0,1,1~ Test  <tibble [96 x 4~
##  3         3 <fit[+]> UPDATE: REGRESSION WITH ARIMA(3,0,~ Test  <tibble [96 x 4~
##  4         4 <fit[+]> REGRESSION WITH ARIMA(2,1,2)(1,0,1~ Test  <tibble [96 x 4~
##  5         5 <fit[+]> UPDATE: REGRESSION WITH ARIMA(2,1,~ Test  <tibble [96 x 4~
##  6         6 <fit[+]> PROPHET                             Test  <tibble [96 x 4~
##  7         7 <fit[+]> PROPHET                             Test  <tibble [96 x 4~
##  8         8 <fit[+]> PROPHET W/ REGRESSORS               Test  <tibble [96 x 4~
##  9         9 <fit[+]> PROPHET W/ REGRESSORS               Test  <tibble [96 x 4~
## 10        10 <fit[+]> ETS(A,AD,N)                         Test  <tibble [96 x 4~
## 11        11 <fit[+]> UPDATE: TBATS(0.671, {2,0}, 0.856,~ Test  <tibble [96 x 4~

Forecast Future

  1. Start with refit_tbl
  2. Use modeltime_forecast() to forecast the new_data = forecast_tbl. Use data_prepared_tbl as the actual data.
  3. Plot the forecast using plot_modeltime_forecast()
refit_tbl %>%
    modeltime_forecast(new_data    = forecast_tbl,
                       actual_data = data_prepared_tbl) %>%
    plot_modeltime_forecast()
## Warning in forecast.forecast_ARIMA(model, h = h_horizon, xreg = xreg_matrix, :
## Upper prediction intervals are not finite.

## Warning in forecast.forecast_ARIMA(model, h = h_horizon, xreg = xreg_matrix, :
## Upper prediction intervals are not finite.

## Warning in forecast.forecast_ARIMA(model, h = h_horizon, xreg = xreg_matrix, :
## Upper prediction intervals are not finite.

## Warning in forecast.forecast_ARIMA(model, h = h_horizon, xreg = xreg_matrix, :
## Upper prediction intervals are not finite.
## Error: Problem occurred during prediction. Error in setup_dataframe(object, df): Found NaN in column sunday
## 
## Error: Problem occurred during prediction. Error in setup_dataframe(object, df): Found NaN in column sunday